/**
 * CNTEC Success Modal Styles
 * 
 * Styling for the success modal displayed after lead form submission.
 * 
 * @package CNTEC_Orcamento
 * @since 1.0.0
 */

/* ============================================
   BODY STATE WHEN MODAL OPEN
   ============================================ */

body.cntec-modal-open {
    overflow: hidden;
}

/* ============================================
   MODAL OVERLAY
   ============================================ */

.cntec-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.cntec-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   MODAL CONTAINER
   ============================================ */

.cntec-modal-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    animation: slideUp 0.4s ease;
}

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

.cntec-modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ============================================
   SUCCESS ICON
   ============================================ */

.cntec-modal-icon {
    margin-bottom: 24px;
}

.cntec-modal-icon svg {
    width: 80px;
    height: 80px;
    color: #10b981;
    animation: scaleIn 0.5s ease 0.2s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Checkmark animation */
.cntec-modal-icon svg polyline {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: drawCheck 0.6s ease 0.5s forwards;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

/* ============================================
   MODAL TYPOGRAPHY
   ============================================ */

.cntec-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.cntec-modal-message {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

/* ============================================
   ORDER CODE
   ============================================ */

.cntec-modal-code-wrapper {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.cntec-modal-code-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.cntec-modal-code {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--cntec-primary, #2563eb);
    font-family: 'Courier New', Courier, monospace;
    word-break: break-all;
}

/* ============================================
   INFO BOX
   ============================================ */

.cntec-modal-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #eff6ff;
    border-radius: 8px;
    margin-bottom: 28px;
    font-size: 14px;
    color: #1d4ed8;
}

.cntec-modal-info svg {
    flex-shrink: 0;
    color: #3b82f6;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.cntec-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cntec-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.cntec-modal-btn-primary {
    background: var(--cntec-primary, #2563eb);
    color: #ffffff;
}

.cntec-modal-btn-primary:hover {
    background: var(--cntec-primary-dark, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.cntec-modal-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.cntec-modal-btn-secondary:hover {
    background: #e5e7eb;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .cntec-modal-content {
        padding: 32px 24px;
    }
    
    .cntec-modal-title {
        font-size: 24px;
    }
    
    .cntec-modal-icon svg {
        width: 64px;
        height: 64px;
    }
    
    .cntec-modal-code {
        font-size: 16px;
    }
}

/* ============================================
   MODAL CLOSING ANIMATION
   ============================================ */

.cntec-success-modal.is-closing .cntec-modal-backdrop {
    animation: fadeOut 0.3s ease forwards;
}

.cntec-success-modal.is-closing .cntec-modal-container {
    animation: slideDown 0.3s ease forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}
