/**
 * SongLab AI Embed - WordPress Plugin Styles
 * Suno AI-inspired dark theme
 */

/* Container Styles */
.songlab-embed-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1e 0%, #212126 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Credit Display Header */
.songlab-credits-header {
    background: linear-gradient(135deg, #26262B 0%, #2d2d32 100%);
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #3a3a3f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.songlab-credits-info {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.songlab-credit-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.songlab-credit-label {
    color: #999;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.songlab-credit-value {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.songlab-credit-badge {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.songlab-credit-badge.tier1 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.songlab-credit-badge.tier2 {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.songlab-credit-badge.video {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.songlab-credit-badge.free {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

/* Package Badge Styling */
.songlab-package-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.songlab-package-badge.free {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.songlab-package-badge.basic {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.songlab-package-badge.advanced {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.songlab-package-badge.expert {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.songlab-package-badge.custom_4,
.songlab-package-badge.custom_12,
.songlab-package-badge.custom_20 {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Credit Divider */
.songlab-credit-divider {
    width: 2px;
    height: 40px;
    background: linear-gradient(180deg, transparent 0%, #3a3a3f 50%, transparent 100%);
    margin: 0 10px;
}

/* Actions Section */
.songlab-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Purchase Button */
.songlab-purchase-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.songlab-purchase-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    text-decoration: none;
    color: white;
}

.songlab-purchase-btn:active {
    transform: translateY(0);
}

.songlab-purchase-btn.video {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.songlab-purchase-btn.video:hover {
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

/* Refresh Button */
.songlab-refresh-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 10px 20px;
    border: 1px solid #3a3a3f;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.songlab-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #6366f1;
}

.songlab-refresh-btn.loading {
    opacity: 0.6;
    cursor: wait;
}

.songlab-refresh-icon {
    display: inline-block;
    transition: transform 0.5s ease;
}

.songlab-refresh-btn.loading .songlab-refresh-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* iframe Container */
.songlab-iframe-wrapper {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #212126;
    border: 1px solid #3a3a3f;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.songlab-iframe {
    width: 100%;
    border: none;
    display: block;
    background: #212126;
}

/* Loading State */
.songlab-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1e 0%, #212126 100%);
    z-index: 10;
}

.songlab-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.songlab-loading-text {
    margin-top: 20px;
    color: #999;
    font-size: 14px;
    font-weight: 500;
}

/* Login Required / Error Messages */
.songlab-login-required,
.songlab-auth-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 40px;
}

.songlab-message-box {
    background: linear-gradient(135deg, #26262B 0%, #2d2d32 100%);
    border-radius: 16px;
    padding: 50px 60px;
    text-align: center;
    max-width: 500px;
    border: 1px solid #3a3a3f;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.songlab-message-box.error {
    border-color: rgba(239, 68, 68, 0.3);
}

.songlab-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.songlab-message-box h3 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.songlab-message-box p {
    color: #999;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.songlab-button {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.songlab-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    color: white;
    text-decoration: none;
}

.songlab-register-link {
    margin-top: 20px;
    font-size: 14px;
}

.songlab-register-link a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

.songlab-register-link a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .songlab-embed-container {
        padding: 15px;
        border-radius: 12px;
    }

    .songlab-credits-header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .songlab-credits-info {
        gap: 20px;
        width: 100%;
        justify-content: space-around;
    }

    .songlab-credit-value {
        font-size: 20px;
    }

    .songlab-message-box {
        padding: 40px 30px;
    }

    .songlab-message-box h3 {
        font-size: 24px;
    }

    .songlab-message-box p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .songlab-credits-info {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .songlab-credit-item {
        width: 100%;
        text-align: center;
    }

    .songlab-credit-value {
        justify-content: center;
    }
}

/* Animation Utilities */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.songlab-fade-in {
    animation: fadeIn 0.5s ease;
}

/* Success/Error Notifications */
.songlab-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.songlab-notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.songlab-notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* User Info Display */
.songlab-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 14px;
}

.songlab-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.songlab-user-name {
    font-weight: 600;
}

/* Hidden utility */
.songlab-hidden {
    display: none !important;
}

/* Login Modal Styles */
.songlab-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.songlab-modal.active {
    display: flex;
}

.songlab-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.songlab-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a1e 0%, #212126 100%);
    border-radius: 16px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #3a3a3f;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s ease;
    z-index: 10001;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.songlab-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #999;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.songlab-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: rotate(90deg);
}

.songlab-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.songlab-modal-header .songlab-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.songlab-modal-header h2 {
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.songlab-modal-header p {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* Login Form */
.songlab-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.songlab-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.songlab-form-group label {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.songlab-form-group input[type="text"],
.songlab-form-group input[type="password"],
.songlab-form-group input[type="email"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #3a3a3f;
    border-radius: 8px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.2s ease;
}

.songlab-form-group input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.songlab-form-group input::placeholder {
    color: #666;
}

.songlab-form-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.songlab-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
    margin: 0;
}

.songlab-form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6366f1;
}

.songlab-form-checkbox span {
    color: #999;
    font-size: 14px;
}

.songlab-form-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.songlab-form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.songlab-form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.songlab-submit-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
}

.songlab-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.songlab-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.songlab-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.songlab-submit-btn .songlab-btn-loading {
    display: none;
}

.songlab-submit-btn.loading .songlab-btn-text {
    display: none;
}

.songlab-submit-btn.loading .songlab-btn-loading {
    display: inline;
}

.songlab-modal-footer {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3a3a3f;
}

.songlab-modal-footer p {
    margin: 10px 0;
    font-size: 14px;
    color: #999;
}

.songlab-modal-footer a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

.songlab-modal-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .songlab-modal-content {
        padding: 30px 20px;
        width: 95%;
    }

    .songlab-modal-header h2 {
        font-size: 22px;
    }
}
