/* ===========================================
   DEMO POPUP - Styles
   =========================================== */

.demo-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.demo-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.demo-popup-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 550px;
    width: 100%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.demo-popup-overlay.show .demo-popup-container {
    transform: scale(1) translateY(0);
}

.demo-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #2D3748;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.demo-popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.demo-popup-content {
    padding: 3rem 2.5rem;
    text-align: center;
}

.demo-popup-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0F5E9E, #3A8FD6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 25px rgba(15, 94, 158, 0.3);
}

.demo-popup-content h2 {
    color: #0F5E9E;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.demo-popup-subtitle {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Account Selector */
.demo-accounts-selector {
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.demo-accounts-selector h3 {
    color: #2D3748;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #F7FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.account-option:hover {
    border-color: #0F5E9E;
    background: #EDF2F7;
    transform: translateX(5px);
}

.account-option.selected {
    border-color: #0F5E9E;
    background: linear-gradient(135deg, #E6F3FF, #F0F8FF);
    box-shadow: 0 4px 12px rgba(15, 94, 158, 0.15);
}

.account-icon {
    font-size: 2rem;
    line-height: 1;
}

.account-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.account-info strong {
    color: #2D3748;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
}

.account-info small {
    color: #718096;
    font-size: 0.85rem;
}

.account-option.selected .account-info strong {
    color: #0F5E9E;
}

/* Credentials Box */
.demo-credentials-box {
    background: #F7FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.demo-credentials-box h3 {
    color: #2D3748;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.credential-item {
    margin-bottom: 1.5rem;
}

.credential-item:last-child {
    margin-bottom: 0;
}

.credential-item label {
    display: block;
    color: #718096;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.credential-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    position: relative;
}

.credential-value span {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #2D3748;
    font-weight: 600;
}

.copy-btn {
    background: #0F5E9E;
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.copy-btn:hover {
    background: #3A8FD6;
    transform: scale(1.1);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-feedback {
    position: absolute;
    right: -80px;
    top: 50%;
    transform: translateY(-50%);
    background: #2E8B57;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    animation: fadeInOut 2s ease;
    z-index: 100;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-50%) translateX(-10px);
    }
    20% {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
    80% {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) translateX(10px);
    }
}

/* Actions */
.demo-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-demo-auto,
.btn-demo-manual {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-demo-auto {
    background: linear-gradient(135deg, #0F5E9E, #3A8FD6);
    color: white;
    box-shadow: 0 6px 20px rgba(15, 94, 158, 0.4);
}

.btn-demo-auto:hover:not(:disabled) {
    background: linear-gradient(135deg, #0d4f85, #2e7bc0);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 94, 158, 0.5);
}

.btn-demo-auto:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-demo-auto.success {
    background: linear-gradient(135deg, #2E8B57, #3CB371);
}

.btn-demo-manual {
    background: #FF6B4A;
    color: white;
    box-shadow: 0 6px 20px rgba(255, 107, 74, 0.4);
}

.btn-demo-manual:hover {
    background: #ff5535;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 74, 0.5);
}

/* Info Box */
.demo-popup-info {
    background: #FFF5E6;
    border-left: 4px solid #FF6B4A;
    padding: 1rem;
    border-radius: 8px;
}

.demo-popup-info p {
    margin: 0;
    color: #2D3748;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Error Message */
.demo-popup-error {
    background: #FEE;
    border-left: 4px solid #E53E3E;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

.demo-popup-error p {
    margin: 0;
    color: #742A2A;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Success Message */
.demo-popup-success {
    background: #E6FFED;
    border-left: 4px solid #2E8B57;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

.demo-popup-success p {
    margin: 0;
    color: #1C4532;
    font-size: 0.9rem;
    line-height: 1.5;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .demo-popup-content {
        padding: 2rem 1.5rem;
    }

    .demo-popup-content h2 {
        font-size: 1.5rem;
    }

    .demo-popup-subtitle {
        font-size: 1rem;
    }

    .demo-popup-actions {
        flex-direction: column;
    }

    .credential-value {
        padding: 0.75rem;
    }

    .credential-value span {
        font-size: 0.9rem;
    }

    .copy-feedback {
        position: fixed;
        top: 20px;
        right: 20px;
        left: 20px;
        transform: none;
    }
}

/* Animation d'entrée */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.demo-popup-overlay.show .demo-popup-content > * {
    animation: slideInUp 0.5s ease-out backwards;
}

.demo-popup-overlay.show .demo-popup-content > *:nth-child(1) {
    animation-delay: 0.1s;
}

.demo-popup-overlay.show .demo-popup-content > *:nth-child(2) {
    animation-delay: 0.2s;
}

.demo-popup-overlay.show .demo-popup-content > *:nth-child(3) {
    animation-delay: 0.3s;
}

.demo-popup-overlay.show .demo-popup-content > *:nth-child(4) {
    animation-delay: 0.4s;
}

.demo-popup-overlay.show .demo-popup-content > *:nth-child(5) {
    animation-delay: 0.5s;
}
