/* Window Replacement Quote Widget Styles */

.window-quote-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.quote-toggle {
    min-width: 140px;
    height: 50px;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding: 0 20px;
    white-space: nowrap;
    overflow: hidden;
}

.quote-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.quote-toggle svg {
    width: 20px;
    height: 20px;
    fill: white;
    margin-right: 8px;
}

.quote-container {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    max-height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.quote-container.active {
    display: flex;
}

.quote-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
}

.quote-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    color: white;
}

.quote-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    width: 50px;
    height: 0px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-family: Arial, sans-serif;
    font-weight: normal;
    line-height: 1;
}

.quote-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.quote-form-container {
    flex: 1;
    max-height: 500px;
    overflow-y: auto;
    padding: 24px;
    background: #fafbfc;
}

.quote-form-container::-webkit-scrollbar {
    width: 6px;
}

.quote-form-container::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 3px;
}

.quote-form-container::-webkit-scrollbar-thumb {
    background: #c1c8cd;
    border-radius: 3px;
}

.quote-form-container::-webkit-scrollbar-thumb:hover {
    background: #a8b2ba;
}

/* Gravity Forms Styling Overrides */
.quote-form-container .gform_wrapper {
    max-width: none !important;
    margin: 0 !important;
    background: transparent !important;
    color: #374151 !important;
}

.quote-form-container .gform_wrapper form {
    margin: 0 !important;
    padding: 0 !important;
    color: #374151 !important;
}

.quote-form-container .gform_wrapper .gform_body {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: #374151 !important;
}

.quote-form-container .gform_wrapper .gfield {
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    color: #374151 !important;
}

.quote-form-container .gform_wrapper .top_label .gfield_label {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 0 8px 0 !important;
    color: #374151 !important;
    display: block !important;
}

.quote-form-container .gform_wrapper .gfield_description,
.quote-form-container .gform_wrapper .instruction {
    color: #6b7280 !important;
    font-size: 13px !important;
}

.quote-form-container .gform_wrapper input[type="text"],
.quote-form-container .gform_wrapper input[type="email"],
.quote-form-container .gform_wrapper input[type="tel"],
.quote-form-container .gform_wrapper input[type="url"],
.quote-form-container .gform_wrapper input[type="number"],
.quote-form-container .gform_wrapper textarea,
.quote-form-container .gform_wrapper select {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    background: white !important;
    transition: border-color 0.2s ease !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.quote-form-container .gform_wrapper input:focus,
.quote-form-container .gform_wrapper textarea:focus,
.quote-form-container .gform_wrapper select:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.quote-form-container .gform_wrapper textarea {
    min-height: 80px !important;
    resize: vertical !important;
}

.quote-form-container .gform_wrapper select {
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
}

/* Checkbox and Radio Styling */
.quote-form-container .gform_wrapper .gfield_checkbox li,
.quote-form-container .gform_wrapper .gfield_radio li {
    margin: 8px 0 !important;
    list-style: none !important;
    color: #374151 !important;
}

.quote-form-container .gform_wrapper .gfield_checkbox li label,
.quote-form-container .gform_wrapper .gfield_radio li label {
    color: #374151 !important;
    font-size: 14px !important;
}

.quote-form-container .gform_wrapper input[type="checkbox"],
.quote-form-container .gform_wrapper input[type="radio"] {
    margin: 0 8px 0 0 !important;
    width: auto !important;
}

/* Submit Button */
.quote-form-container .gform_wrapper .gform_footer {
    margin: 24px 0 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.quote-form-container .gform_wrapper .gform_footer input[type="submit"],
.quote-form-container .gform_wrapper .gform_footer button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    padding: 14px 28px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    width: 100% !important;
    transition: transform 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.quote-form-container .gform_wrapper .gform_footer input[type="submit"]:hover,
.quote-form-container .gform_wrapper .gform_footer button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4) !important;
}

/* Success Message */
.quote-form-container .gform_confirmation_wrapper {
    background: #f0f9ff !important;
    border: 2px solid #0ea5e9 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    text-align: center !important;
}

.quote-form-container .gform_confirmation_message {
    color: #0c4a6e !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

/* Required Field Indicators */
.quote-form-container .gform_wrapper .gfield_required .gfield_label:after {
    content: " *" !important;
    color: #ef4444 !important;
}

/* Error Styling */
.quote-form-container .gform_wrapper .gfield_error {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-radius: 8px !important;
    padding: 12px !important;
}

.quote-form-container .gform_wrapper .gfield_error input,
.quote-form-container .gform_wrapper .gfield_error textarea,
.quote-form-container .gform_wrapper .gfield_error select {
    border-color: #ef4444 !important;
}

.quote-form-container .gform_wrapper .validation_error {
    color: #dc2626 !important;
    font-size: 12px !important;
    margin: 4px 0 0 0 !important;
}

/* General Text Color Override */
.quote-form-container,
.quote-form-container * {
    color: #374151 !important;
}

.quote-form-container .gform_wrapper .gform_title,
.quote-form-container .gform_wrapper .gform_description,
.quote-form-container .gform_wrapper p,
.quote-form-container .gform_wrapper div,
.quote-form-container .gform_wrapper span {
    color: #374151 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .window-quote-widget {
        bottom: 20px;
        right: 20px;
        left: auto;
        width: auto;
    }
    
    .quote-toggle {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        font-size: 0 !important;
        justify-content: center !important;
        position: relative !important;
        overflow: visible !important;
    }
    
    .quote-toggle svg {
        margin: 0 !important;
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Completely hide text content on mobile */
    .quote-toggle {
        text-indent: -9999px;
    }
    
    .quote-toggle svg {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .quote-container {
        width: calc(100vw - 40px);
        max-width: 380px;
        left: auto;
        right: 20px;
        bottom: 90px;
        max-height: calc(100vh - 140px);
    }
    
    .quote-form-container {
        padding: 20px;
    }
    
    .quote-header {
        padding: 16px 20px;
    }
    
    .quote-header h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .window-quote-widget {
        bottom: 15px !important;
        right: 15px !important;
        width: auto !important;
    }
    
    .quote-toggle {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        font-size: 0 !important;
    }
    
    .quote-toggle svg {
        width: 22px !important;
        height: 22px !important;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .quote-container {
        width: calc(100vw - 30px);
        right: 15px;
        bottom: 85px;
        border-radius: 12px;
        max-height: calc(100vh - 120px);
    }
    
    .quote-form-container {
        padding: 16px;
    }
}

/* Loading State */
.quote-form-container .gform_wrapper.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Hide Gravity Forms default styling that conflicts */
.quote-form-container .gform_wrapper .gform_body ul,
.quote-form-container .gform_wrapper .gform_footer ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.quote-form-container .gform_wrapper .gfield ul {
    list-style: none !important;
    padding: 0 !important;
}

/* Ensure proper box-sizing */
.quote-form-container *,
.quote-form-container *:before,
.quote-form-container *:after {
    box-sizing: border-box;
}