/* Custom modal overlay and glassmorphism styling */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 20, 10, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.custom-modal-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 100px rgba(112, 162, 37, 0.15);
    width: 90%;
    max-width: 480px;
    padding: 45px 35px 35px;
    position: relative;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal-overlay.active .custom-modal-card {
    transform: scale(1) translateY(0);
}

/* Modal Close Button */
.custom-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #8c96a0;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.custom-modal-close:hover {
    color: #dc3545;
    background: rgba(0, 0, 0, 0.04);
    transform: rotate(90deg);
}

/* Loading Spinner */
.elegant-spinner {
    width: 65px;
    height: 65px;
    border: 4px solid rgba(0, 0, 0, 0.05);
    border-left-color: #db4442;
    border-right-color: #70a225;
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 1s linear infinite;
}

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

/* Drawing Checkmark Animation */
.checkmark-svg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #70a225;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px rgba(112, 162, 37, 0.1);
    animation: fillCheck 0.4s ease-in-out 0.4s forwards, scaleCheck 0.3s ease-in-out forwards;
    margin: 0 auto 24px;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: #70a225;
    fill: none;
    animation: strokeCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: strokeCheck 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes strokeCircle {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes strokeCheck {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scaleCheck {
    0%,
    100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fillCheck {
    100% {
        box-shadow: inset 0px 0px 0px 40px rgba(112, 162, 37, 0.05);
    }
}

/* Error Cross Icon */
.error-icon-wrapper {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.error-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #dc3545;
    background: rgba(220, 53, 69, 0.05);
    position: relative;
    animation: shake 0.5s ease-in-out;
}

.error-cross-line {
    position: absolute;
    height: 4px;
    width: 40px;
    background-color: #dc3545;
    border-radius: 2px;
    top: 35px;
    left: 17px;
}

.error-cross-line.line1 {
    transform: rotate(45deg);
}

.error-cross-line.line2 {
    transform: rotate(-45deg);
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    20%,
    60% {
        transform: translateX(-8px);
    }
    40%,
    80% {
        transform: translateX(8px);
    }
}

/* Text Styles */
.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a2530;
    margin-bottom: 12px;
}

.success-title {
    color: #70a225;
}

.error-title {
    color: #dc3545;
}

.modal-text {
    font-size: 17px;
    color: #636d77;
    line-height: 1.6;
    margin-bottom: 22px;
}

/* Details box inside Success Modal */
.modal-info-box {
    background: #f8faf7;
    border: 1px solid rgba(112, 162, 37, 0.1);
    border-radius: 5px;
    padding: 16px 20px;
    margin-bottom: 20px;
    text-align: left;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row span {
    color: #7a8a70;
    font-weight: 500;
}

.info-row strong {
    color: #2c3e20;
}

.modal-hint {
    font-size: 15px;
    color: #8c988a;
    margin-bottom: 24px;
    font-style: italic;
}

/* WhatsApp CTA Button */
.whatsapp-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white !important;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 5px;
    text-decoration: none !important;
    font-size: 17px;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    width: 100%;
}

.whatsapp-cta-btn i {
    font-size: 20px;
    margin-right: 8px;
}

.whatsapp-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, #2ae06d, #149d8e);
}

.whatsapp-cta-btn:active {
    transform: translateY(-1px);
}

/* Error Action Button */
.modal-action-btn {
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 15px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.error-btn {
    background: #dc3545;
    color: white;
    box-shadow: 0 6px 12px rgba(220, 53, 69, 0.2);
}

.error-btn:hover {
    background: #c82333;
    box-shadow: 0 10px 18px rgba(220, 53, 69, 0.3);
    transform: translateY(-2px);
}

/* Input Validation Highlights */
.invalid-feedback {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: block;
    text-align: left;
    font-weight: 500;
}

input.is-invalid,
textarea.is-invalid {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.02) !important;
}

input.is-valid,
textarea.is-valid {
    border-color: #70a225 !important;
    background-color: rgba(112, 162, 37, 0.02) !important;
}

/* Adjust intlTelInput styling */
.iti {
    width: 100%;
    display: block;
}

.comment-form__input-box input:not(:placeholder-shown),
.comment-form__input-box textarea:not(:placeholder-shown) {
    background: #e8f0e8 !important;
    color: #1e2d1e !important;
}

.iti input:not(:placeholder-shown) {
    background: #e8f0e8 !important;
    color: #1e2d1e !important;
}

.comment-form__input-box input:-webkit-autofill,
.comment-form__input-box input:-webkit-autofill:hover,
.comment-form__input-box input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #e8f0e8 inset !important;
    -webkit-text-fill-color: #1e2d1e !important;
    transition: background-color 5000s ease-in-out 0s;
}

.html-strip-toast {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
    animation: fadeInToast 0.2s ease;
}

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