/* YouTube to MP3 Converter - WordPress Plugin Styles */

.ytmp3-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.ytmp3-header {
    text-align: center;
    margin-bottom: 28px;
}

.ytmp3-logo {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0 0 4px;
    letter-spacing: -1px;
}

.ytmp3-y {
    color: #ee1111;
}

.ytmp3-logo span:last-child {
    color: #1a6fd4;
}

.ytmp3-subtitle {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #6b7280;
    text-transform: uppercase;
    margin: 0 0 6px;
}

.ytmp3-desc {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

/* Card */
.ytmp3-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.09), 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #e8edf4;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* URL input row */
.ytmp3-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.ytmp3-url-input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid #dde3ed;
    border-radius: 12px;
    font-size: 0.92rem;
    color: #1f2937;
    background: #f9fafc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ytmp3-url-input:focus {
    border-color: #1a6fd4;
    box-shadow: 0 0 0 3px rgba(26,111,212,0.12);
    background: #fff;
}

.ytmp3-url-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ytmp3-convert-btn {
    padding: 12px 26px;
    background: #1a6fd4;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, opacity 0.2s;
}

.ytmp3-convert-btn:hover {
    background: #155ab6;
}

.ytmp3-convert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* URL error */
.ytmp3-error-msg {
    color: #dc2626;
    font-size: 0.8rem;
    margin: -10px 0 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Format buttons */
.ytmp3-formats {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.ytmp3-format-btn {
    padding: 8px 22px;
    border-radius: 999px;
    border: 1.5px solid #dde3ed;
    background: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.18s;
}

.ytmp3-format-btn:hover {
    border-color: #1a6fd4;
    color: #1f2937;
}

.ytmp3-format-btn.active {
    background: #1a6fd4;
    color: #fff;
    border-color: #1a6fd4;
    box-shadow: 0 2px 8px rgba(26,111,212,0.25);
}

.ytmp3-format-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Progress */
.ytmp3-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 6px;
}

.ytmp3-progress-bar-bg {
    height: 8px;
    background: #e8edf4;
    border-radius: 999px;
    overflow: hidden;
}

.ytmp3-progress-bar {
    height: 100%;
    background: #1a6fd4;
    border-radius: 999px;
    width: 0%;
    transition: width 0.5s ease;
}

.ytmp3-progress-title {
    font-size: 0.78rem;
    color: #6b7280;
    margin: 6px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Result card */
.ytmp3-result-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f5f8fc;
    border: 1px solid #dde3ed;
    border-radius: 14px;
    padding: 14px;
    flex-wrap: wrap;
}

.ytmp3-thumb {
    width: 90px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dde3ed;
    flex-shrink: 0;
}

.ytmp3-result-info {
    flex: 1;
    min-width: 0;
}

.ytmp3-result-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ytmp3-ready-badge {
    font-size: 0.76rem;
    color: #16a34a;
    font-weight: 600;
}

.ytmp3-result-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.ytmp3-download-btn {
    display: inline-block;
    padding: 9px 18px;
    background: #16a34a;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 10px;
    font-size: 0.87rem;
    font-weight: 700;
    text-align: center;
    transition: background 0.18s;
}

.ytmp3-download-btn:hover {
    background: #15803d;
    color: #fff !important;
}

.ytmp3-reset-btn {
    padding: 6px 14px;
    border: 1.5px solid #dde3ed;
    border-radius: 8px;
    background: #fff;
    font-size: 0.78rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.18s;
    text-align: center;
}

.ytmp3-reset-btn:hover {
    border-color: #9ca3af;
    color: #1f2937;
}

/* Error card */
.ytmp3-error-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 14px;
}

.ytmp3-error-icon {
    font-size: 1.2rem;
    color: #dc2626;
    flex-shrink: 0;
    margin-top: 2px;
}

.ytmp3-error-info {
    flex: 1;
    min-width: 0;
}

.ytmp3-error-info strong {
    font-size: 0.9rem;
    color: #dc2626;
    display: block;
    margin-bottom: 3px;
}

.ytmp3-error-info p {
    font-size: 0.8rem;
    color: #b91c1c;
    margin: 0;
}

.ytmp3-retry-btn {
    padding: 8px 16px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.18s;
}

.ytmp3-retry-btn:hover {
    background: #b91c1c;
}

/* Footer note */
.ytmp3-footer-note {
    text-align: center;
    font-size: 0.78rem;
    color: #9ca3af;
    margin: 14px 0 0;
}

/* Responsive */
@media (max-width: 520px) {
    .ytmp3-input-row {
        flex-direction: column;
    }
    .ytmp3-convert-btn {
        width: 100%;
    }
    .ytmp3-result-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .ytmp3-result-actions {
        flex-direction: row;
        width: 100%;
    }
    .ytmp3-download-btn {
        flex: 1;
    }
}
