/* SCRCOG Contact Popup - Frontend Styles */
/* Inherits styles from Divi theme */

/* Contact Button - Full width blue button */
.scrcog-contact-btn {
    display: block;
    margin: 1rem auto 0 auto;
    padding: 20px 30px;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid #464F85;
    border-radius: 0 !important;
    background-color: #464F85 !important;
    color: #ffffff !important;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: inherit;
}

/* If Divi button class is added via shortcode, override with our styles */
.scrcog-contact-btn.et_pb_button {
    background-color: #464F85 !important;
    color: #ffffff !important;
    border: 2px solid #464F85;
    font-family: inherit;
}

.scrcog-contact-btn:hover,
.scrcog-contact-btn.et_pb_button:hover {
    background-color: #ffffff !important;
    color: #464F85 !important;
    border: 2px solid #464F85 !important;
}

/* Body class when lightbox is open */
body.scrcog-lightbox-open {
    overflow: hidden;
}

/* Lightbox Container */
.scrcog-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.scrcog-lightbox[aria-hidden="false"] {
    display: block;
}

/* Lightbox Overlay */
.scrcog-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}

/* Lightbox Content Container */
.scrcog-lightbox-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
}

.scrcog-lightbox-content {
    position: relative;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scrcogSlideIn 0.3s ease;
}

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

/* Close Button */
.scrcog-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: transparent;
    border: none;
    font-size: 30px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    z-index: 10;
    padding: 0;
}

/* Form Wrapper */
.scrcog-form-wrapper {
    padding: 40px 30px;
}

.scrcog-form-title {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 600;
    color: inherit;
    line-height: 1.3;
    font-family: inherit;
}

.scrcog-form-description {
    margin: 0 0 25px;
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    font-family: inherit;
}

/* Contact Form */
.scrcog-contact-form {
    margin: 0;
}

.scrcog-form-row {
    margin-bottom: 20px;
}

.scrcog-form-field {
    width: 100%;
}

.scrcog-form-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    font-family: inherit;
}

.scrcog-form-field .required {
    color: #e74c3c;
}

.scrcog-form-field .optional {
    font-weight: 400;
    color: #999;
    font-size: 13px;
}

/* Input Fields - Inherit Divi input styles */
.scrcog-form-field input[type="text"],
.scrcog-form-field input[type="email"],
.scrcog-form-field input[type="tel"],
.scrcog-form-field textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.scrcog-form-field input:focus,
.scrcog-form-field textarea:focus {
    outline: none;
    border-color: #2ea3f2;
    box-shadow: 0 0 0 2px rgba(46, 163, 242, 0.1);
}

.scrcog-form-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* Submit Button - Match contact button style */
.scrcog-submit-btn {
    display: block;
    margin: 0 auto;
    padding: 20px 30px;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid #464F85;
    border-radius: 0 !important;
    background-color: #464F85 !important;
    color: #ffffff !important;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: inherit;
}

.scrcog-submit-btn:hover {
    background-color: #ffffff !important;
    color: #464F85 !important;
    border: 2px solid #464F85 !important;
}

.scrcog-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form Response Messages */
.scrcog-form-response {
    display: none;
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.5;
}

.scrcog-form-response p {
    margin: 0;
}

.scrcog-form-response.scrcog-success {
    display: block;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.scrcog-form-response.scrcog-error {
    display: block;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .scrcog-lightbox-container {
        padding: 10px;
    }
    
    .scrcog-lightbox-content {
        max-height: 95vh;
    }
    
    .scrcog-form-wrapper {
        padding: 30px 20px;
    }
    
    .scrcog-form-title {
        font-size: 24px;
    }
    
    .scrcog-form-description {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .scrcog-lightbox-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 24px;
    }
    
    .scrcog-form-wrapper {
        padding: 25px 15px;
    }
    
    .scrcog-form-title {
        font-size: 22px;
    }
}

/* Accessibility */
.scrcog-contact-btn:focus,
.scrcog-lightbox-close:focus,
.scrcog-submit-btn:focus {
    outline: 2px solid #2ea3f2;
    outline-offset: 2px;
}

/* Animation for button press */
.scrcog-contact-btn:active,
.scrcog-submit-btn:active {
    transform: scale(0.98);
}
