/* Botão de Compatibilidade eSIM */
.esim-compatibility-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333333;
    border: 2px solid #e9ecef;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.esim-compatibility-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.esim-compatibility-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.esim-compatibility-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading */
.esim-compatibility-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #6b7280;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.esim-compatibility-modal,
.compatibility-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    overflow: hidden;
    box-sizing: border-box;
    pointer-events: auto;
}

.modal-content {
    background-color: #ffffff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    pointer-events: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #6b7280;
    font-size: 20px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 1);
    color: #374151;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Resultado */
.esim-result {
    padding: 32px;
    text-align: center;
}

.result-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.esim-result h3 {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.esim-result p {
    margin: 0 0 24px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
}

.device-details {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
    text-align: left;
    border: 1px solid #e5e7eb;
}

.device-details p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #6b7280;
}

.device-details p:last-child {
    margin-bottom: 0;
}

.device-details strong {
    color: #374151;
    font-weight: 600;
}

/* Instruções de verificação */
.verification-instructions {
    margin-top: 16px;
    padding: 16px;
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
}

.verification-instructions p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #1e40af;
}

.verification-instructions p:last-child {
    margin-bottom: 0;
}

.verification-instructions strong {
    color: #1d4ed8;
    font-weight: 600;
}

/* Estados de compatibilidade */
.esim-result.compatible {
    border-top: 4px solid #10b981;
}

.esim-result.incompatible {
    border-top: 4px solid #ef4444;
}

.esim-result.error {
    border-top: 4px solid #f59e0b;
}

/* Modal Desktop com QR Code */
.esim-result.desktop-modal {
    text-align: center;
}

.qr-code-section {
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

#qr-code {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 128px;
    height: 128px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px;
}

.qr-code-text {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

.qr-code-fallback {
    text-align: center;
    padding: 20px;
    background: #f3f4f6;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.qr-code-fallback p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #6b7280;
}

.qr-code-fallback p:last-child {
    margin-bottom: 0;
    font-weight: 600;
    color: #374151;
}

.link-section {
    width: 100%;
    max-width: 400px;
}

.link-section p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #374151;
    font-weight: 600;
}

.link-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.compatibility-link {
    flex: 1;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: #ffffff;
    font-family: inherit;
}

.compatibility-link:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.copy-link-btn {
    padding: 12px 16px;
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-link-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.copy-link-btn.copied {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

/* Botões de ação */
.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.esim-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.5px;
}

.esim-btn.primary {
    background-color: #ffffff;
    color: #374151;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.esim-btn.primary:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.esim-btn.secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.esim-btn.secondary:hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    
    .esim-result {
        padding: 20px;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .esim-btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
    }
    
    .qr-code-section {
        gap: 16px;
    }
    
    .link-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .copy-link-btn {
        width: 100%;
        padding: 12px 16px;
    }
}

/* ===== COMPATIBILITY VERIFICATION WIDGET ===== */

/* Botão de Verificação de Compatibilidade */
.compatibility-verification-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333333;
    border: 2px solid #e9ecef;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.compatibility-verification-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.compatibility-verification-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.compatibility-verification-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modal de Verificação de Compatibilidade */
.compatibility-modal,
.compatibility-verification-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    overflow: hidden;
    box-sizing: border-box;
    pointer-events: auto;
    isolation: isolate;
}

.compatibility-modal .modal-content {
    background-color: #ffffff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    pointer-events: auto;
    isolation: isolate;
}

.compatibility-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #6b7280;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.compatibility-modal .modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

/* Resultado de Compatibilidade */
.compatibility-result {
    padding: 32px;
    text-align: center;
}

.compatibility-result .result-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.compatibility-result h3 {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.compatibility-result p {
    margin: 0 0 24px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
}

/* Seção QR Code */
.compatibility-result .qr-code-section {
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.compatibility-result .qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.compatibility-result #qr-code {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 128px;
    height: 128px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px;
}

.compatibility-result .qr-code-text {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

.compatibility-result .qr-code-fallback {
    text-align: center;
    padding: 20px;
    background: #f3f4f6;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.compatibility-result .qr-code-fallback p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #6b7280;
}

.compatibility-result .qr-code-fallback p:last-child {
    margin-bottom: 0;
    font-weight: 600;
    color: #374151;
}

/* Seção Link */
.compatibility-result .link-section {
    width: 100%;
    max-width: 400px;
}

.compatibility-result .link-section p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #374151;
    font-weight: 600;
}

.compatibility-result .link-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.compatibility-result .compatibility-link {
    flex: 1;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: #ffffff;
    font-family: inherit;
}

.compatibility-result .compatibility-link:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.compatibility-result .copy-link-btn {
    padding: 12px 16px;
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.compatibility-result .copy-link-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.compatibility-result .copy-link-btn.copied {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

/* Botões de ação */
.compatibility-result .result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.compatibility-result .compatibility-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.compatibility-result .compatibility-btn.primary {
    background-color: #ffffff;
    color: #374151;
    border: 2px solid #d1d5db;
}

.compatibility-result .compatibility-btn.primary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.compatibility-result .compatibility-btn.secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.compatibility-result .compatibility-btn.secondary:hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

/* Responsividade para o novo widget */
@media (max-width: 768px) {
    .compatibility-modal .modal-content {
        width: 95%;
        max-height: 85vh;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    
    .compatibility-result {
        padding: 20px;
    }
    
    .compatibility-result .result-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .compatibility-result .compatibility-btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
    }
    
    .compatibility-result .qr-code-section {
        gap: 16px;
    }
    
    .compatibility-result .link-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .compatibility-result .copy-link-btn {
        width: 100%;
        padding: 12px 16px;
    }
}

/* Regras específicas para smartphones pequenos */
@media (max-width: 480px) {
    .modal-content,
    .compatibility-modal .modal-content {
        width: 98%;
        max-height: 90vh;
        margin: 5vh auto;
    }
    
    .esim-result,
    .compatibility-result {
        padding: 16px;
    }
    
    .esim-result h3,
    .compatibility-result h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .esim-result p,
    .compatibility-result p {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .qr-code-section {
        gap: 12px;
    }
    
    .qr-code-container {
        padding: 16px;
    }
    
    #qr-code {
        width: 120px;
        height: 120px;
    }
    
    .link-container {
        gap: 6px;
    }
    
    .compatibility-link {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .copy-link-btn,
    .compatibility-result .copy-link-btn {
        font-size: 12px;
        padding: 10px 14px;
    }
} 