/* Commercial Auto Quote Form - Updated with Better UX */

/* Hero Section with Background */
.quote-hero-section {
    position: relative;
    background-color: #0f2b46;
    background-image:
        linear-gradient(135deg,
            rgba(0, 0, 0, 0.62) 0%,
            rgba(0, 0, 0, 0.65) 50%,
            rgba(0, 0, 0, 0.65) 100%),
        url('./../../images/commercial_auto.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.quote-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(33, 150, 243, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(26, 84, 144, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.quote-hero-overlay {
    display: none;
}

.quote-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 40px 20px;
}

.quote-hero-content h1 {
    font-family: var(--font-serif), 'Poppins', sans-serif;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.quote-hero-content p {
    font-size: 18px;
    opacity: 0.95;
    margin: 0;
}

/* Main Quote Section */
.quote-main-section {
    background: #f8fafc;
    padding: 60px 20px;
}

.quote-main-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* Form Wrapper */
.quote-form-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Compact Form Section */
.compact-form-section {
    padding: 30px 35px;
    border-bottom: 1px solid #e5e7eb;
}

.compact-form-section:last-of-type {
    border-bottom: none;
}

/* Compact Section Header */
.compact-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--secondary-color);
    position: relative;
}

.compact-section-header i {
    font-size: 22px;
    color: var(--secondary-color);
}

.compact-section-header h3 {
    font-family: var(--font-serif), 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
}

/* 3-Column Form Grid */
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* 2-Column Form Grid */
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

/* Form Field */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field.span-2 {
    grid-column: span 2;
}

.form-field.span-3 {
    grid-column: span 3;
}

.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: block;
}

.req {
    color: #ef4444;
    font-weight: 700;
}

/* Input Fields */
.input-field {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--font-sans);
    color: var(--text-dark);
    background: white;
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.input-field::placeholder {
    color: #9ca3af;
}

select.input-field {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231a5490%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 10px auto;
    cursor: pointer;
    padding-right: 30px;
}

textarea.input-field {
    resize: vertical;
    min-height: 70px;
    line-height: 1.5;
    font-family: var(--font-sans);
}

/* Driver & Vehicle Cards - NO BORDER COLOR ON HOVER */
.driver-card,
.vehicle-card {
    background: #ffffff;
    /* border: 1px solid #e5e7eb; */
    border: none;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); */
    overflow: hidden;
    /* border-bottom: 1px solid #e5e7eb; */
}

.driver-card:hover,
.vehicle-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.driver-card-header,
.vehicle-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e5e7eb;
}

.driver-card-header h4,
.vehicle-card-header h4 {
    font-family: var(--font-serif), 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.driver-card-header h4 i {
    color: var(--secondary-color);
}

.vehicle-card-header h4 i {
    color: #10b981;
}

/* Scrollable Fields Container - REPLACES TABLE */
.driver-fields-container,
.vehicle-fields-container {
    padding: 20px;
    /* Removed scrollbar to show full content */
}

/* Custom Scrollbar */
.driver-fields-container::-webkit-scrollbar,
.vehicle-fields-container::-webkit-scrollbar {
    width: 8px;
}

.driver-fields-container::-webkit-scrollbar-track,
.vehicle-fields-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.driver-fields-container::-webkit-scrollbar-thumb,
.vehicle-fields-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.driver-fields-container::-webkit-scrollbar-thumb:hover,
.vehicle-fields-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Field Grid inside scrollable area */
.driver-field-grid,
.vehicle-field-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Header Counter */
.header-counter {
    color: var(--secondary-color);
    font-weight: 400;
    margin-left: 8px;
    font-size: 16px;
    opacity: 0.8;
}

/* Add More Button Container - Simplified */
.counter-add-container {
    margin-top: 20px;
}

/* Add More Button - Now in flex container with counter */
.add-more-btn {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px dashed var(--secondary-color);
    border-radius: 8px;
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-more-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1976D2 100%);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.add-more-btn i {
    font-size: 16px;
}

.add-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Remove Button - Cross Icon Style */
.remove-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    background: #fee2e2;
    border: none;
    border-radius: 50%;
    color: #dc2626;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: #dc2626;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.remove-btn i {
    font-size: 14px;
}

/* Submit Area */
.form-submit-area {
    display: flex;
    gap: 15px;
    padding: 35px;
    background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
    border-top: 1px solid #e5e7eb;
}

.submit-btn,
.reset-btn {
    flex: 1;
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1976D2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

.reset-btn {
    background: white;
    color: #64748b;
    border: 1.5px solid #d1d5db;
}

.reset-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* Error Label */
.error-label {
    color: #ef4444 !important;
}

.error-label+.input-field {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Sidebar */
.quote-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.sidebar-card h3 {
    font-family: var(--font-serif), 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-card h3 i {
    color: var(--secondary-color);
    font-size: 20px;
}

/* Benefits List */
.benefits-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s;
}

.benefits-list li:hover {
    background: #eff6ff;
    transform: translateX(5px);
}

.benefits-list li i {
    font-size: 20px;
    color: var(--secondary-color);
    margin-top: 2px;
    flex-shrink: 0;
}

.benefits-list li div {
    flex: 1;
}

.benefits-list li strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.benefits-list li span {
    font-size: 12px;
    color: #64748b;
}

/* Coverage List */
.coverage-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coverage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 6px;
    transition: all 0.3s;
}

.coverage-item:hover {
    background: #eff6ff;
    transform: translateX(5px);
}

.coverage-item i {
    color: #10b981;
    font-size: 16px;
    flex-shrink: 0;
}

.coverage-item span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Related Links */
.related-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-link-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #e5e7eb;
}

.related-link-card:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--secondary-color);
}

.related-link-card img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.related-link-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.related-link-content h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}

.related-link-content p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.link-arrow {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 18px;
    color: var(--secondary-color);
    transition: transform 0.3s;
}

.related-link-card:hover .link-arrow {
    transform: translateX(4px);
}

/* Contact Card */
.contact-card {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1976D2 100%);
    color: white;
    text-align: center;
}

.contact-card h3,
.contact-card p {
    color: white;
}

.contact-card h3 {
    margin: 15px 0 10px 0;
    justify-content: center;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.contact-icon i {
    font-size: 28px;
    color: white;
}

.contact-card p {
    font-size: 14px;
    opacity: 0.95;
    margin: 0 0 15px 0;
}

.contact-phone {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    margin: 15px 0 10px 0;
    letter-spacing: 0.5px;
}

.contact-phone:hover {
    text-decoration: underline;
}

.contact-hours {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 1080px) {
    .quote-main-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .quote-sidebar {
        display: none;
    }

    .form-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .driver-field-grid,
    .vehicle-field-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .quote-hero-content h1 {
        font-size: 32px;
    }

    .quote-hero-content p {
        font-size: 16px;
    }

    .quote-main-section {
        padding: 40px 15px;
    }

    .compact-form-section {
        padding: 25px 20px;
    }

    /* Force 1 column for all grids */
    .form-grid-3,
    .form-grid-2,
    .driver-field-grid,
    .vehicle-field-grid {
        grid-template-columns: 1fr;
    }

    .form-field.span-2,
    .form-field.span-3 {
        grid-column: span 1;
    }

    .driver-card,
    .vehicle-card {
        margin-bottom: 15px;
    }

    /* Remove scroll effect - show full height */
    .driver-fields-container,
    .vehicle-fields-container {
        padding: 15px;
        max-height: none;
        overflow: visible;
    }

    .driver-field-grid,
    .vehicle-field-grid {
        gap: 14px;
    }

    .counter-add-container {
        flex-direction: column;
        align-items: stretch;
    }

    .counter-badge {
        text-align: center;
    }

    .form-submit-area {
        flex-direction: column;
        padding: 25px 20px;
    }

    .submit-btn,
    .reset-btn {
        width: 100%;
    }

    .sidebar-card {
        padding: 25px;
    }

    .related-link-card img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .quote-hero-section {
        min-height: 250px;
    }

    .quote-hero-content {
        padding: 30px 15px;
    }

    .quote-hero-content h1 {
        font-size: 28px;
    }

    .quote-hero-content p {
        font-size: 14px;
    }

    .quote-form-wrapper {
        border-radius: 12px;
    }

    .compact-form-section {
        padding: 20px 15px;
    }

    .compact-section-header h3 {
        font-size: 16px;
    }

    .compact-section-header i {
        font-size: 20px;
    }

    .input-field {
        padding: 9px 11px;
        font-size: 14px;
    }

    .driver-card,
    .vehicle-card {
        margin-bottom: 12px;
    }

    .driver-card-header,
    .vehicle-card-header {
        padding: 15px;
    }

    .driver-card-header h4,
    .vehicle-card-header h4 {
        font-size: 14px;
    }

    .driver-fields-container,
    .vehicle-fields-container {
        padding: 12px;
        max-height: 300px;
    }

    .driver-field-grid,
    .vehicle-field-grid {
        gap: 12px;
    }

    .counter-badge {
        font-size: 12px;
        padding: 6px 14px;
    }

    .add-more-btn {
        padding: 10px 18px;
        font-size: 13px;
    }

    .remove-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .form-submit-area {
        padding: 20px 15px;
    }

    .submit-btn,
    .reset-btn {
        padding: 12px 25px;
        font-size: 14px;
    }

    .sidebar-card {
        padding: 20px;
    }

    .contact-phone {
        font-size: 20px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.compact-form-section {
    animation: fadeInUp 0.4s ease forwards;
}

.driver-card,
.vehicle-card {
    animation: slideIn 0.3s ease forwards;
}

.compact-form-section:nth-child(1) {
    animation-delay: 0s;
}

.compact-form-section:nth-child(2) {
    animation-delay: 0.05s;
}

.compact-form-section:nth-child(3) {
    animation-delay: 0.1s;
}

.compact-form-section:nth-child(4) {
    animation-delay: 0.15s;
}

.compact-form-section:nth-child(5) {
    animation-delay: 0.2s;
}

.compact-form-section:nth-child(6) {
    animation-delay: 0.25s;
}

.compact-form-section:nth-child(7) {
    animation-delay: 0.3s;
}

.compact-form-section:nth-child(8) {
    animation-delay: 0.35s;
}