/**
 * CAD Drawings Accordion Styles
 */

.cad-drawings-accordion {
    width: 100%;
    margin-bottom: 30px;
}

.cad-main-title {
    margin-bottom: 20px;
}

.cad-accordion-item {
    margin-bottom: 10px;
    overflow: hidden;
}

.cad-accordion-item:last-child {
    margin-bottom: 0; /* Remove margin from last item */
}

.cad-accordion-title {
    padding: 15px 15px 15px 20px; /* Added 20px left padding */
    background-color: #f5f5f5;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
    border-bottom: 1px solid #000; /* Black divider */
}

.cad-accordion-title:hover {
    background-color: #e9e9e9;
}

.cad-accordion-icon {
    margin-right: 10px;
    font-weight: bold;
    font-family: monospace; /* Use monospace font for better symbol rendering */
    font-size: 18px; /* Slightly larger for better visibility */
    display: inline-block;
    width: 15px; /* Fixed width to prevent layout shifts */
    text-align: center;
}

.cad-accordion-content {
    display: none; /* Ensure accordion is collapsed by default */
    padding: 20px;
    background-color: #fff;
}

.cad-accordion-item.active .cad-accordion-content {
    display: block;
}

.cad-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    border-spacing: 0; /* Ensure no spacing between cells */
}

/* Add padding around the table */
.cad-accordion-content {
    padding: 20px;
}

/* Ensure header styles are not overridden */
.cad-table thead th,
.cad-table > thead > tr > th {
    padding: 12px 15px 12px 20px; /* Added 20px left padding */
    text-align: left;
    border: none; /* Remove all borders */
    border-bottom: 1px solid #000; /* Add only bottom border in black */
    font-weight: bold;
    padding-left: 20px; /* Ensure 20px left padding for headers */
    vertical-align: top; /* Added vertical alignment */
    line-height: 1.5; /* Set consistent line height */
    /* Background and color are controlled by Elementor controls */
    white-space: nowrap;
}

/* Body cell styles */
.cad-table tbody td {
    padding: 12px 15px 12px 20px; /* Added 20px left padding */
    text-align: left;
    border: none; /* Remove all borders */
    border-bottom: 1px solid #000; /* Add only bottom border in black */
    background-color: #fff !important; /* Ensure white background for all cells */
    vertical-align: top; /* Added vertical alignment */
    line-height: 1.5; /* Set consistent line height */
}

/* Force white background for all BODY rows by default, overriding any browser defaults */
.cad-table tbody tr,
.cad-table tbody tr:nth-child(odd),
.cad-table tbody tr:nth-child(even) {
    background-color: #fff !important; /* White background for all body rows */
}

/* Ensure no vertical lines between columns */
.cad-table,
.cad-table tr,
.cad-table th,
.cad-table td {
    border-left: none !important;
    border-right: none !important;
}

.cad-files {
    vertical-align: top; /* Ensure this specific cell also aligns top */
    text-align: left; /* Align file links left */
    white-space: nowrap;
}

.cad-file-link {
    display: inline-block;
    margin-right: 24px; /* Space between file links */
    padding: 0 10px; /* Removed vertical padding, keep horizontal */
    color: #0054A6; /* Set text color to specified blue */
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s, background-color 0.3s;
    background-color: transparent;
    border-radius: 3px; /* Keep rounded corners for hover */
}

.cad-file-link:last-child {
    margin-right: 0; /* Remove margin from last file link */
}

/* File type specific styles */
.cad-file-link.dwg,
.cad-file-link.dxf,
.cad-file-link.pdf {
    color: #0054A6; /* Ensure blue color for these specific file types */
}

/* Hover effect - white text with blue background */
.cad-file-link.dwg:hover,
.cad-file-link.dxf:hover,
.cad-file-link.pdf:hover {
    color: #ffffff; /* White text on hover */
    background-color: #0054A6; /* Blue background on hover */
}

/* No entries message */
.cad-no-entries {
    padding: 15px 15px 15px 20px;
    font-style: italic;
    color: #777;
}
