/* HubSpot Button Widget Styles */

/* Button Base Styles */
.hubspot-cta-btn {
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    min-width: 150px;
}

.hubspot-cta-btn:hover {
    transform: scale(1.05);
}

.hubspot-cta-btn:active {
    transform: translateY(0);
}

.hubspot-cta-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Modal Overlay Styles */
.hubspot-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.hubspot-modal-overlay.active {
    display: flex;
}

/* Modal Content */
.hubspot-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 1200px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

/* Modal Animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button */
.hubspot-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
    z-index: 1;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hubspot-close-btn:hover,
.hubspot-close-btn:focus {
    color: #333;
    outline: none;
}

/* Container Styles */
.hubspot-form-container {
    position: relative;
}

/* HubSpot Form Styling Overrides */
.hubspot-modal-content .hs-form {
    font-family: inherit !important;
    margin: 0;
}

.hubspot-modal-content .hs-form-field {
    margin-bottom: 20px !important;
}

.hubspot-modal-content .hs-form-field label {
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    display: block !important;
    color: #333 !important;
}

.hubspot-modal-content .hs-input,
.hubspot-modal-content .hs-input[type="text"],
.hubspot-modal-content .hs-input[type="email"],
.hubspot-modal-content .hs-input[type="tel"],
.hubspot-modal-content textarea.hs-input {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e1e5e9 !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    transition: border-color 0.3s ease !important;
    box-sizing: border-box !important;
}

.hubspot-modal-content .hs-input:focus,
.hubspot-modal-content .hs-input[type="text"]:focus,
.hubspot-modal-content .hs-input[type="email"]:focus,
.hubspot-modal-content .hs-input[type="tel"]:focus,
.hubspot-modal-content textarea.hs-input:focus {
    border-color: #667eea !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.hubspot-modal-content .hs-submit {
    margin-top: 20px !important;
}

.hubspot-modal-content .hs-submit .hs-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    padding: 15px 30px !important;
    border-radius: 8px !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    width: 100% !important;
}

.hubspot-modal-content .hs-submit .hs-button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
}

/* Error Styles */
.hubspot-modal-content .hs-error-msgs {
    margin-top: 8px !important;
}

.hubspot-modal-content .hs-error-msg {
    color: #e74c3c !important;
    font-size: 14px !important;
    margin: 5px 0 !important;
}

/* Loading State */
.hubspot-form-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.hubspot-form-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

@media (max-width: 1200px) {
    .hubspot-modal-content {
        width: 95% !important;
        padding: 20px !important;
        margin: 20px auto !important;
        max-height: 90vh !important;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hubspot-modal-content {
        width: 95% !important;
        padding: 20px !important;
        margin: 20px !important;
        max-height: 90vh !important;
    }
    
    .hubspot-cta-btn {
        padding: 12px 24px !important;
        font-size: 14px !important;
        min-width: 120px !important;
    }
    
    .hubspot-close-btn {
        top: 10px !important;
        right: 15px !important;
        font-size: 24px !important;
    }
}

@media (max-width: 480px) {
    .hubspot-modal-content {
        width: 98% !important;
        padding: 15px !important;
        margin: 10px !important;
        border-radius: 8px !important;
    }
    
    .hubspot-cta-btn {
        width: 100% !important;
        padding: 15px 20px !important;
        font-size: 16px !important;
    }
}
