/* Ensure the container uses the full available width */
.taxesbyross-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    box-sizing: border-box;
}

/* Adjust column widths */
.taxesbyross-column {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    box-sizing: border-box;
}

.taxesbyross-input {
    width: 70%;
    background: #fff;
    border: 1px solid #ddd;
    min-height: 400px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.taxesbyross-summary {
    width: 28%;
    background: #e9ecef;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

/* Collapsible Section Styles */
.collapsible-section {
    margin-bottom: 10px;
}

.section-header {
    background: #0073aa;
    color: white;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    position: relative;
    transition: background 0.2s;
}

.section-header:hover {
    background: #fff;
    color: #0073aa;
}

.section-header h3 {
    margin: 0;
    font-size: 1.2rem;
    display: inline;
}

/* Arrow indicator */
.section-header::after {
    content: '\25BC'; /* Down arrow */
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s;
}

.section-header.collapsed::after {
    content: '\25B6'; /* Right arrow */
}

.section-content {
    padding: 15px;
    border: 1px solid #ddd;
    border-top: none;
    background: #fff;
    border-radius: 0 0 4px 4px;
    display: none; /* Ensure hidden by default, overridden by jQuery if expanded */
}

/* Ensure section-content is visible when not collapsed */
.section-content[style*="display: block"] {
    display: block !important;
}

/* Style form elements within sections */
.section-content label {
    display: block;
    margin: 10px 0;
    line-height: 1.5;
    font-size: 1.1rem;
}

.section-content input[type="text"],
.section-content input[type="number"],
.section-content input[type="date"],
.section-content select,
.section-content input[type="checkbox"] {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.section-content input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* Collapse All button */
#collapse-all-btn {
    margin-bottom: 15px;
    padding: 10px 20px;
    background: #6c757d; /* Gray to distinguish from other buttons */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#collapse-all-btn:hover {
    background: #63685a;
}

/* Accessibility for focus states */
.section-header:focus,
.section-content input:focus,
.section-content select:focus,
.summary-buttons button:focus,
#collapse-all-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Summary buttons */
.summary-buttons {
    margin-top: 20px;
}

.summary-buttons button {
    margin-right: 10px;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.summary-buttons button:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#pdf-btn {
    background: #28a745;
}

#pdf-btn:hover {
    background: #218838;
}

#quote-btn {
    background: #17a2b8;
}

#quote-btn:hover {
    background: #138496;
}

#reset-btn {
    background: #6c757d;
}

#reset-btn:hover {
    background: #5a6268;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .taxesbyross-container {
        flex-direction: column;
    }

    .taxesbyross-input,
    .taxesbyross-summary {
        width: 100%;
        margin-bottom: 20px;
    }

    .taxesbyross-input {
        max-height: none;
    }

    .taxesbyross-summary {
        position: relative;
        top: 0;
    }

    .section-header h3 {
        font-size: 1.1rem;
    }

    .section-content {
        padding: 10px;
    }

    #collapse-all-btn {
        width: 100%;
        text-align: center;
    }
}