/**
 * CONFIGURAÇÕES - ESTILOS
 * Tela de configurações do sistema com API Keys e preferências
 * Design Moderno & Responsivo - v2.0
 */

/* ============================================================================
   CONFIGURAÇÕES GERAIS & VARIÁVEIS
   ============================================================================ */

:root {
    --card-radius: 20px;
    --input-radius: 12px;
    --btn-radius: 12px;
    --transition-speed: 0.3s;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.content-area {
    padding: 2rem;
    background: #f4f7f9;
    /* Slightly cooler gray */
    min-height: calc(100vh - 80px);
}

/* ============================================================================
   CARDS E SEÇÕES GERAIS
   ============================================================================ */

.config-section {
    background: transparent;
    /* Remove background from section container */
    box-shadow: none;
    border: none;
    padding: 0;
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    border-bottom: none;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: -0.5px;
}

.section-title i {
    color: var(--primary-color);
    background: rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.5rem;
}

.section-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.25);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.section-description {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    max-width: 800px;
    line-height: 1.6;
}

/* ============================================================================
   CARD PADRÃO (BASE PARA TODOS)
   ============================================================================ */

.api-key-card,
.preference-card,
.day-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed) cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.api-key-card:hover,
.preference-card:hover,
.day-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.3);
}

/* ============================================================================
   API KEYS SECTION - DESIGN REFINADO
   ============================================================================ */

.api-keys-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.api-key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.api-key-title {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.api-key-title i {
    font-size: 1.75rem;
    color: var(--primary-color);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.12) 0%, rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.02) 100%);
    border-radius: 18px;
}

.api-key-title h4 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 0.25rem 0;
}

.api-key-title p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-badge i {
    font-size: 1.1rem;
}

.status-badge.status-inactive {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge.status-active {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.status-testing {
    background: #fef3c7;
    color: #d97706;
}

.api-key-body {
    padding: 2rem;
}

/* Inputs Modernos */
.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    border-radius: var(--input-radius);
    padding: 0.8rem 1rem;
    border: 2px solid #eef2f6;
    background-color: #f8fafc;
    font-size: 1rem;
    transition: all 0.2s ease;
    color: var(--text-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.1);
}

.api-key-input-group {
    position: relative;
}

.api-key-input {
    padding-right: 3.5rem;
    font-family: 'Roboto Mono', monospace;
    letter-spacing: 0px;
    font-weight: 500;
}

.api-key-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.api-key-toggle:hover {
    background: var(--primary-color);
    color: white;
}

/* Pagar.me Specifics */
.pagarme-instructions {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f0fdfa;
    /* Teal-50 */
    border: 1px solid #ccfbf1;
    border-radius: 16px;
    color: #115e59;
}

.pagarme-webhook-list {
    margin: 0.5rem 0 1rem 1.5rem;
    font-weight: 500;
}

.pagarme-webhook code {
    background: #fff;
    border: 1px solid #99f6e4;
    color: #0d9488;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
}

.api-key-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.api-key-actions .btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: var(--btn-radius);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.api-key-actions .btn-outline-secondary {
    border: 2px solid #e2e8f0;
    color: #64748b;
}

.api-key-actions .btn-outline-secondary:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #475569;
}

/* ============================================================================
   PREFERÊNCIAS - LISTA DE CONFIGURAÇÕES (Refatorado v3.0)
   ============================================================================ */

.settings-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background-color 0.2s;
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

/* Info Section (Left) */
.settings-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.settings-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.security-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.theme-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.color-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.settings-details h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.2rem 0;
    color: var(--text-color);
}

.settings-details p {
    font-size: 0.85rem;
    margin: 0;
    color: var(--text-muted);
}

/* Action Section (Right) */
.settings-action {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle - Pill Style */
.theme-toggle-wrapper {
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    display: flex;
    border: 1px solid #e2e8f0;
}

.theme-toggle-btn {
    border: none;
    background: transparent;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    color: #475569;
}

.theme-toggle-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Color Selector - Row Style */
.color-selector-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    background: var(--dot-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.color-dot:hover {
    transform: translateY(-2px);
}

.color-dot.active {
    box-shadow: 0 0 0 2px var(--primary-color), 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
    border-color: white;
}

.vertical-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 4px;
}

.custom-dot {
    background: conic-gradient(#ff0080, #ff8c00, #40e0d0, #ff0080);
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-dot i {
    font-size: 10px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .settings-action {
        width: 100%;
        justify-content: flex-start;
        /* Left align actions on mobile */
    }

    .settings-info {
        width: 100%;
    }

    .color-selector-row {
        flex-wrap: wrap;
    }
}

/* Dark Mode Overrides */
[data-theme="dark"] .settings-card {
    background: #242424;
    border-color: #333;
}

[data-theme="dark"] .settings-row {
    border-bottom-color: #333;
}

[data-theme="dark"] .settings-row:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .theme-toggle-wrapper {
    background: #1a1a1a;
    border-color: #333;
}

[data-theme="dark"] .theme-toggle-btn {
    color: #9ca3af;
}

[data-theme="dark"] .theme-toggle-btn.active {
    background: #333;
    color: var(--primary-color);
}

[data-theme="dark"] .color-dot {
    border-color: #333;
}

[data-theme="dark"] .vertical-divider {
    background: #404040;
}

/* ============================================================================
   HORÁRIOS - GRIDS LIMPOS
   ============================================================================ */

.day-card {
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.day-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.day-card-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Solid subtle line instead of dashed */
}

.day-card-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

.day-card-header small {
    color: var(--text-muted);
}

.form-check-input {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

.day-card-times .form-label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.day-card-times .form-control-sm {
    height: 42px;
    border-radius: 10px;
    font-weight: 500;
}

/* Pagar.me Test Result */
.pagarme-test-result small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Actions for Working Hours Section */
.working-hours-actions {
    margin-top: 3rem;
    /* Increased margin for better separation */
    text-align: center;
    /* Center the button */
}

.working-hours-actions .btn {
    min-width: 250px;
    /* Slightly wider button */
    padding: 0.8rem 1.5rem;
    font-weight: 700;
    gap: 0.5rem;
    border-radius: var(--btn-radius);
    box-shadow: 0 4px 12px rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.2);
    transition: all 0.3s ease;
}

.working-hours-actions .btn:hover {
    box-shadow: 0 6px 16px rgba(var(--primary-r), var(--primary-g), var(--primary-b), 0.3);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .working-hours-actions .btn {
        width: 100%;
        /* Full width on smaller screens */
        min-width: unset;
    }
}

/* ============================================================================
   RESPONSIVIDADE OTIMIZADA
   ============================================================================ */

@media (max-width: 992px) {
    .content-area {
        padding: 1rem;
    }

    .api-key-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .api-key-status {
        width: 100%;
    }

    .status-badge {
        width: 100%;
        justify-content: center;
    }

    .api-key-actions {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .api-key-title i {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .preference-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Dark Mode Fixes */
[data-theme="dark"] .content-area {
    background: #1a1a1a;
}

[data-theme="dark"] .api-key-card,
[data-theme="dark"] .preference-card,
[data-theme="dark"] .day-card {
    background: #242424;
    border-color: #333;
}

[data-theme="dark"] .api-key-header {
    background: #2a2a2a;
    border-bottom-color: #333;
}

[data-theme="dark"] .form-control {
    background: #1a1a1a;
    border-color: #333;
    color: #e0e0e0;
}

[data-theme="dark"] .form-control:focus {
    background: #1a1a1a;
    border-color: var(--primary-color);
}

[data-theme="dark"] .theme-selector {
    background: #1a1a1a;
}

[data-theme="dark"] .theme-option.active {
    background: #333;
}

[data-theme="dark"] .pagarme-instructions {
    background: rgba(13, 148, 136, 0.1);
    border-color: rgba(13, 148, 136, 0.2);
    color: #2dd4bf;
}

[data-theme="dark"] .pagarme-webhook code {
    background: rgba(0, 0, 0, 0.3);
    border-color: #115e59;
}

/* ============================================================================
   WHATSAPP INTEGRATION STYLES (PREMIUM REFACTOR)
   ============================================================================ */

.premium-card {
    border: none;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.card-glass-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #25D366, #128C7E);
}

.whatsapp-icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15) 0%, rgba(37, 211, 102, 0.05) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #25D366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.1);
}

/* Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    opacity: 0.4;
    animation: pulse 2s infinite;
}

.status-disconnected {
    background: #fee2e2;
    color: #dc2626;
}

.status-disconnected .status-dot {
    background: #dc2626;
}

.status-disconnected .status-dot::after {
    background: #dc2626;
}

.status-connected {
    background: #dcfce7;
    color: #16a34a;
}

.status-connected .status-dot {
    background: #16a34a;
}

.status-connected .status-dot::after {
    background: #16a34a;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    70% {
        transform: scale(2);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Content Layout */
.whatsapp-content-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
}

/* Left Side: Info */
.whatsapp-info-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-highlight {
    background: rgba(37, 211, 102, 0.06);
    border-left: 4px solid #25D366;
    padding: 1.25rem;
    border-radius: 0 12px 12px 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-highlight i {
    color: #25D366;
    font-size: 1.25rem;
    margin-top: 2px;
}

.info-highlight p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

.connection-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.step-number {
    width: 28px;
    height: 28px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Instance Info Card */
.instance-info-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    animation: slideUp 0.4s ease;
}

.instance-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.instance-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.detail-row .label {
    color: var(--text-muted);
}

.detail-row .value {
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
}

/* Right Side: Actions */
.whatsapp-action-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
}

.connection-summary-card {
    width: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #0f172a;
}

.summary-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 6px rgba(148, 163, 184, 0.2);
}

.summary-text {
    font-size: 0.95rem;
}

.connection-summary-card p {
    margin: 0.35rem 0 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.connection-summary-card.is-connected {
    border-color: #22c55e33;
    background: linear-gradient(135deg, #ecfdf3 0%, #ffffff 60%);
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.12);
}

.connection-summary-card.is-connected .summary-dot {
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.2);
}

.connection-summary-card.is-connected .summary-text {
    color: #166534;
}

.action-buttons {
    width: 100%;
}

.btn-premium {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-whatsapp-connect {
    background: #25D366;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-connect:hover {
    background: #1ebc57;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp-disconnect {
    background: white;
    border: 2px solid #fee2e2;
    color: #dc2626;
}

.btn-whatsapp-disconnect:hover {
    background: #fee2e2;
    transform: translateY(-2px);
}

/* QR Code Display */
.qr-code-display {
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.qr-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.qr-header h6 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    color: var(--text-color);
}

.qr-image-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 1.5rem auto;
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.qr-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    /* Mantém fundo branco e deixa o código escuro */
    filter: grayscale(1) contrast(2.2);
}

.qr-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(37, 211, 102, 0.2);
    border-top-color: #25D366;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-text-refresh {
    background: none;
    border: none;
    color: #25D366;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-text-refresh:hover {
    background: rgba(37, 211, 102, 0.1);
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .whatsapp-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .whatsapp-action-section {
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        padding-top: 2rem;
    }

    .connection-summary-card {
        text-align: center;
    }

    .summary-header {
        justify-content: center;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .premium-card {
    background: linear-gradient(145deg, #242424, #1f1f1f);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .info-highlight {
    background: rgba(37, 211, 102, 0.1);
    color: #e0e0e0;
}

[data-theme="dark"] .info-highlight p {
    color: #e0e0e0;
}

[data-theme="dark"] .step-number {
    background: #333;
    color: #9ca3af;
}

[data-theme="dark"] .instance-info-card {
    background: #2a2a2a;
    border-color: #333;
}

[data-theme="dark"] .qr-card {
    background: #2a2a2a;
    border-color: #333;
}

[data-theme="dark"] .qr-image-wrapper {
    background: white;
    /* Keep QR background white for contrast */
}

[data-theme="dark"] .qr-header h6 {
    color: #e0e0e0;
}
