/**
 * Sticky Contact Form Styles
 * Colors: #1d3c6f (primary blue), #fcb448 (accent orange)
 */

/* Sticky Contact Button */
#sticky-contact-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--sticky-contact-primary, #1d3c6f);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(var(--sticky-contact-primary-rgb, 29, 60, 111), 0.3);
    z-index: 9998;
    transition: all 0.3s ease;
    padding: 0;
    opacity: 0;
    animation: fadeInButton 0.5s ease forwards;
}

#sticky-contact-button:hover {
    background-color: var(--sticky-contact-accent, #fcb448);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(var(--sticky-contact-primary-rgb, 29, 60, 111), 0.4);
}

#sticky-contact-button:focus {
    outline: 3px solid var(--sticky-contact-accent, #fcb448);
    outline-offset: 2px;
}

#sticky-contact-button svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

/* Fade-in animation for button */
@keyframes fadeInButton {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Overlay */
.sticky-contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sticky-contact-modal.active {
    display: flex;
    opacity: 1;
}

.sticky-contact-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

/* Modal Content */
.sticky-contact-modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.sticky-contact-modal.active .sticky-contact-modal-content {
    transform: scale(1);
}

/* Close Button */
.sticky-contact-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f5f5f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333333;
    transition: all 0.2s ease;
    z-index: 10001;
    padding: 0;
}

.sticky-contact-modal-close:hover {
    background-color: #e0e0e0;
    color: var(--sticky-contact-primary, #1d3c6f);
}

.sticky-contact-modal-close:focus {
    outline: 2px solid var(--sticky-contact-accent, #fcb448);
    outline-offset: 2px;
}

.sticky-contact-modal-close svg {
    width: 18px;
    height: 18px;
}

/* Modal Body */
.sticky-contact-modal-body {
    padding: 40px 30px 30px;
}

.sticky-contact-modal-title {
    margin: 0 0 25px 0;
    color: var(--sticky-contact-primary, #1d3c6f);
    font-size: 28px;
    font-weight: 600;
    text-align: center;
}

/* Gravity Forms Styling */
#sticky-contact-form-container .gform_wrapper {
    margin: 0;
}

#sticky-contact-form-container .gform_wrapper .gform_body {
    margin-bottom: 0;
}

#sticky-contact-form-container .gform_required_legend {
    font-size: 14px;
}

#sticky-contact-form-container .gform_wrapper input[type="text"],
#sticky-contact-form-container .gform_wrapper input[type="email"],
#sticky-contact-form-container .gform_wrapper input[type="tel"],
#sticky-contact-form-container .gform_wrapper input[type="url"],
#sticky-contact-form-container .gform_wrapper textarea,
#sticky-contact-form-container .gform_wrapper select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 4px 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#sticky-contact-form-container .gform_wrapper input[type="text"]:focus,
#sticky-contact-form-container .gform_wrapper input[type="email"]:focus,
#sticky-contact-form-container .gform_wrapper input[type="tel"]:focus,
#sticky-contact-form-container .gform_wrapper input[type="url"]:focus,
#sticky-contact-form-container .gform_wrapper textarea:focus,
#sticky-contact-form-container .gform_wrapper select:focus {
    outline: none;
    border-color: var(--sticky-contact-primary, #1d3c6f);
}

#sticky-contact-form-container .gform_wrapper .gform_button,
#sticky-contact-form-container .gform_wrapper input[type="submit"] {
    background-color: var(--sticky-contact-primary, #1d3c6f);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

#sticky-contact-form-container .gform_wrapper .gform_button:hover,
#sticky-contact-form-container .gform_wrapper input[type="submit"]:hover {
    background-color: var(--sticky-contact-accent, #fcb448);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--sticky-contact-primary-rgb, 29, 60, 111), 0.3);
}

#sticky-contact-form-container .gform_wrapper .gform_button:focus,
#sticky-contact-form-container .gform_wrapper input[type="submit"]:focus {
    outline: 3px solid var(--sticky-contact-accent, #fcb448);
    outline-offset: 2px;
}

/* Success Message */
.sticky-contact-form-success {
    text-align: center;
    padding: 30px 20px;
}

.sticky-contact-success-message {
    font-size: 24px;
    color: var(--sticky-contact-primary, #1d3c6f);
    font-weight: 600;
    margin: 0 0 25px 0;
}

.sticky-contact-success-close {
    background-color: var(--sticky-contact-primary, #1d3c6f);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sticky-contact-success-close:hover {
    background-color: var(--sticky-contact-accent, #fcb448);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--sticky-contact-primary-rgb, 29, 60, 111), 0.3);
}

.sticky-contact-success-close:focus {
    outline: 3px solid var(--sticky-contact-accent, #fcb448);
    outline-offset: 2px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #sticky-contact-button {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    #sticky-contact-button svg {
        width: 22px;
        height: 22px;
    }
    
    .sticky-contact-modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .sticky-contact-modal-body {
        padding: 30px 20px 20px;
    }
    
    .sticky-contact-modal-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .sticky-contact-modal-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    #sticky-contact-button,
    .sticky-contact-modal,
    .sticky-contact-modal-content,
    .sticky-contact-modal-close,
    .sticky-contact-success-close {
        animation: none;
        transition: none;
    }
}
