/* hCaptcha Modal and Success Modal Styles */
/* Qualified Machine Shop - Professional CAPTCHA Integration */

/* CAPTCHA Modal */
.captcha-modal {
    display: block;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.captcha-modal-content {
    background-color: #ffffff;
    margin: 15% auto;
    padding: 18px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 300px;
    max-height: 380px;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

.captcha-modal-content h3 {
    color: #1a3a52;
    font-size: 17px;
    margin-bottom: 8px;
    font-weight: 600;
}

.captcha-modal-content p {
    color: #666;
    font-size: 12px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.captcha-close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
    position: absolute;
    right: 20px;
    top: 15px;
}

.captcha-close:hover,
.captcha-close:focus {
    color: #f47920;
}

.h-captcha {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.captcha-verify-btn {
    background: linear-gradient(135deg, #f47920 0%, #ff9142 100%);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(244, 121, 32, 0.3);
}

.captcha-verify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 121, 32, 0.4);
}

/* Success Modal */
.success-modal {
    display: block;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.success-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 12% auto;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 550px;
    text-align: center;
    position: relative;
    animation: slideIn 0.4s ease;
    border-top: 5px solid #4CAF50;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 48px;
    color: white;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    animation: scaleIn 0.5s ease;
}

.success-modal-content h2 {
    color: #1a3a52;
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 700;
}

.success-modal-content p {
    color: #555;
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 15px;
}

.success-close-btn {
    background: linear-gradient(135deg, #1a3a52 0%, #2c5f7f 100%);
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 25px;
    box-shadow: 0 4px 15px rgba(26, 58, 82, 0.3);
}

.success-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 58, 82, 0.4);
    background: linear-gradient(135deg, #f47920 0%, #ff9142 100%);
}

/* Form CAPTCHA Container */
.form-captcha-container {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    display: flex;
    justify-content: center;
}

/* Protected Contact Info Styling */
a[href=""],
.phone-number:not([href]),
.email-address:not([href]) {
    color: #f47920;
    font-weight: 600;
    transition: all 0.2s ease;
}

a[href=""]:hover,
.phone-number:not([href]):hover,
.email-address:not([href]):hover {
    color: #1a3a52;
    text-decoration: underline;
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .captcha-modal-content,
    .success-modal-content {
        width: 95%;
        padding: 30px 20px;
        margin: 20% auto;
    }
    
    .captcha-modal-content h3,
    .success-modal-content h2 {
        font-size: 24px;
    }
    
    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }
}

/* Loading State */
button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Error Message */
.error-message {
    animation: slideIn 0.3s ease;
}


/* Loading Spinner for CAPTCHA Initialization */
.captcha-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 78px;
}

.captcha-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b35;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.captcha-loading-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

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

/* Hide CAPTCHA widget while loading */
.h-captcha.loading {
    display: none;
}

.h-captcha.loaded {
    display: flex !important;
    justify-content: center;
}

/* Hide hCaptcha initialization error messages */
/* The CAPTCHA is working correctly despite these errors */
/* Make sure NOT to hide the actual hCaptcha container */
.h-captcha div[style*="color"][style*="rgb"] {
    display: none !important;
}

/* Hide error text that appears below hCaptcha widget */
.h-captcha + div:not(.h-captcha),
.h-captcha + p {
    display: none !important;
}

/* ===== REVEAL BUTTON STYLING ===== */
/* Professional styling for "Click to reveal" buttons in header and footer */

.reveal-email,
.reveal-phone,
button[onclick*="revealContact"],
a[onclick*="revealContact"],
span.email-address:not(.contact-info-revealed),
span.phone-number:not(.contact-info-revealed) {
    display: inline;
    background: none;
    color: inherit;
    border: none;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reveal-email::before,
.reveal-phone::before,
button[onclick*="email"]::before,
a[onclick*="email"]::before,
span.email-address:not(.contact-info-revealed)::before,
button[onclick*="phone"]::before,
a[onclick*="phone"]::before,
span.phone-number:not(.contact-info-revealed)::before {
    content: none;
}

.reveal-email:hover,
.reveal-phone:hover,
button[onclick*="revealContact"]:hover,
a[onclick*="revealContact"]:hover,
span.email-address:not(.contact-info-revealed):hover,
span.phone-number:not(.contact-info-revealed):hover {
    text-decoration-style: solid;
    opacity: 0.8;
}



/* Revealed contact info styling */
.contact-info-revealed {
    display: inline;
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
    transition: opacity 0.2s ease;
    animation: revealFadeIn 0.3s ease;
}

.email-revealed::before,
.phone-revealed::before {
    content: none;
}

.contact-info-revealed:hover {
    opacity: 0.7;
}

@keyframes revealFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal overlay styling for new modal structure */
.captcha-modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.captcha-modal-overlay .captcha-modal {
    background-color: #ffffff;
    padding: 30px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 350px;
    min-height: 280px;
    max-height: 400px;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.captcha-modal-close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
    position: absolute;
    right: 20px;
    top: 15px;
    background: none;
    border: none;
    padding: 0;
}

.captcha-modal-close:hover,
.captcha-modal-close:focus {
    color: #f47920;
}

.captcha-modal h3 {
    color: #1a3a52;
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.captcha-modal p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.captcha-modal .error-message {
    color: #d32f2f;
    background: #ffebee;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    border-left: 4px solid #d32f2f;
}

/* Responsive styling for reveal buttons */
@media (max-width: 768px) {
    .reveal-email,
    .reveal-phone,
    button[onclick*="revealContact"],
    a[onclick*="revealContact"],
    span.email-address:not(.contact-info-revealed),
    span.phone-number:not(.contact-info-revealed),
    .contact-info-revealed {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .reveal-email::before,
    .reveal-phone::before,
    button[onclick*="email"]::before,
    a[onclick*="email"]::before,
    span.email-address:not(.contact-info-revealed)::before,
    button[onclick*="phone"]::before,
    a[onclick*="phone"]::before,
    span.phone-number:not(.contact-info-revealed)::before,
    .email-revealed::before,
    .phone-revealed::before {
        font-size: 14px;
    }
}
