/*
 * File: style.css
 * Path: \themes\kadence-child-theme-master\tools\youtube-thumbnail-downloader\style.css
 * (New, isolated CSS for the YouTube Thumbnail Downloader tool)
 */

#yt-thumbnail-downloader-tool {
    max-width: 900px;
    width: 95%;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Arial, sans-serif;
    text-align: center;
}

#yt-thumbnail-downloader-tool h1 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    color: #333;
    font-weight: 600;
}

/* --- Input Section --- */
.input-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* Space between elements */
    margin-bottom: 2.5rem;
}

.input-section label {
    font-size: 1.2rem;
    color: #555;
    font-weight: 500;
}

#youtubeUrlInput {
    width: 100%;
    max-width: 600px; /* Limit input width */
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#youtubeUrlInput:focus {
    border-color: #FF8A08;
    box-shadow: 0 0 0 3px rgba(255, 138, 8, 0.2);
    outline: none;
}

/* --- Action Buttons (Common Styles) --- */
.action-btn {
    background-color: #FF8A08; /* Orange button */
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 25px; /* Pill-shaped */
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: background-color 0.25s ease, transform 0.1s ease, box-shadow 0.25s ease;
    min-width: 180px; /* Consistent width for main buttons */
    box-shadow: 0 4px 8px rgba(255, 138, 8, 0.3);
}

.action-btn:hover {
    background-color: #e67e22; /* Darker orange on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 138, 8, 0.4);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 138, 8, 0.2);
}

.action-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Specific button styles */
.download-btn {
    background-color: #0073aa; /* WordPress blue for download */
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}
.download-btn:hover {
    background-color: #00568c;
    box-shadow: 0 6px 12px rgba(0, 115, 170, 0.4);
}

.clear-btn {
    background-color: #6c757d; /* Grey for clear */
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}
.clear-btn:hover {
    background-color: #5a6268;
    box-shadow: 0 6px 12px rgba(108, 117, 125, 0.4);
}

/* --- Error Message --- */
.error-message {
    color: #dc3545; /* Red for errors */
    margin-top: 1.5rem;
    font-weight: bold;
    font-size: 1.1rem;
    display: none;
}

/* --- Loading Indicator --- */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    color: #FF8A08;
    font-weight: bold;
    font-size: 1.1rem;
}

.spinner {
    border: 4px solid rgba(255, 138, 8, 0.2);
    border-top: 4px solid #FF8A08;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-top: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Output Section --- */
.output-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee; /* Separator line */
}

.output-section h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1.5rem;
}

#thumbnailPreview {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
}

.quality-info {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #yt-thumbnail-downloader-tool h1 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .action-btn {
        width: 100%; /* Full width for stacked buttons */
        min-width: auto;
        padding: 0.8rem 1.5rem;
        font-size: 1.1rem;
    }
    .input-section {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    #yt-thumbnail-downloader-tool {
        padding: 1.5rem;
    }
    #youtubeUrlInput {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* --- Output Buttons Row --- */
.output-buttons-row {
    display: flex; /* Use flexbox for horizontal alignment */
    justify-content: center; /* Center buttons horizontally */
    gap: 1.5rem; /* Space between buttons */
    margin-top: 2rem; /* Space above the button row */
    margin-bottom: 1rem; /* Space below the button row (if needed, otherwise remove) */
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Ensure individual buttons don't have conflicting margins that break the flex layout */
.output-buttons-row .action-btn {
    margin: 0; /* Remove any default margins that might be applied elsewhere */
}

/* Responsive adjustments for output buttons */
@media (max-width: 768px) {
    .output-buttons-row {
        flex-direction: column; /* Stack buttons vertically on small screens */
        gap: 1rem;
    }
    .output-buttons-row .action-btn {
        width: 100%; /* Make stacked buttons full width */
        min-width: auto;
    }
}