/* Styling for the cello bag finder form */
.cello-bag-finder-form {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;  /* Spacing between input fields */
    margin-top: 20px;
}

.cello-bag-finder-form label {
    font-size: 16px;
    font-weight: 600;
    color: #6b6b6b;
    text-align: right;
    margin-right: 10px; /* Spacing between label and input */
}

/* Center the unit selector */
.unit-selector {
    display: flex;
    justify-content: center; /* Center the unit buttons */
    margin-bottom: 20px;      /* Add space below the buttons */
}

/* Styling the unit buttons */
.unit-button {
    margin: 0 10px;                /* Add space between each button */
    padding: 10px 20px;            /* Adjust padding for a nicer look */
    border: 1px solid #ccc;        /* Button border styling */
    background-color: #f0f0f0;     /* Button background color */
    cursor: pointer;               /* Pointer cursor on hover */
}

.unit-button.selected {
    background-color: #0073aa;     /* Highlight selected button */
    color: white;
    border-color: #0073aa;
}

/* Styling the input rows with flexbox for the form */
.cello-bag-finder-input-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 600px;  /* Set a max width to prevent full page stretch */
    margin-bottom: 15px;
}

.cello-bag-finder-input-row label {
    flex: 1;
    margin-right: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #6b6b6b;
}

.cello-bag-finder-input-row .cello-bag-finder-input-container {
    flex: 2;
    position: relative;
    display: flex;
    align-items: center;
    border: #2a3545;
    border-style: solid;
    border-width: 2px;
    border-radius: 5px;
}

.cello-bag-finder-input-container input {
    width: 100%;
    padding: 10px;
    border: 2px solid #354357;
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: border-color 0.3s, background-color 0.3s;
    font-size: 16px;
}

.cello-bag-finder-input-container input:focus {
    border-color: #2a3545;
    background-color: #fff;
}

.spinner {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px !important;
    height: 20px !important;
}

.fullscreen-spinner img {
    width: 50px !important; /* Fullscreen spinner size */
    height: 50px !important;
}


/* Styling for buttons */
.cello-bag-finder-button {
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background-color: #2d3b50;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.cello-bag-finder-button.active {
    background-color: #3f5c7f;
}

.cello-bag-finder-button:hover {
    background-color: #4a6b90;
}

/* Styling for the product table */
.cello-bag-finder-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.cello-bag-finder-table th,
.cello-bag-finder-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
}

.cello-bag-finder-table th {
    background-color: #f8f8f8;
    font-weight: bold;
    color: #333;
}

.cello-bag-finder-table td {
    background-color: #fff;
}

/* Alternating row background color */
.cello-bag-finder-table tr:nth-child(even) td {
    background-color: #f9f9f9;
}

.cello-bag-finder-table img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.cello-bag-finder-table a {
    color: #3f5c7f;
    text-decoration: none;
    font-weight: bold;
}

.cello-bag-finder-table a:hover {
    color: #1d4c6d;
}

/* Width adjustments for table columns */
.cello-bag-finder-table th:nth-child(1) {
    width: 10%;
}

.cello-bag-finder-table th:nth-child(2) {
    width: 40%;
}

.cello-bag-finder-table th:nth-child(3),
.cello-bag-finder-table th:nth-child(4),
.cello-bag-finder-table th:nth-child(5) {
    width: 15%;
}

/* Center "To Fit" and "Link" columns */
.cello-bag-finder-table td:nth-child(4),
.cello-bag-finder-table td:nth-child(5) {
    text-align: center;
}

/* Grey-out effect on the table during search */
.table-grey-out {
    position: relative;
}

.table-grey-out::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(200, 200, 200, 0.5); /* Light grey with transparency */
    z-index: 1;
    display: none;  /* Hidden by default */
}

.table-grey-out.loading::before {
    display: block;  /* Show grey overlay when loading */
}

.table-grey-out table {
    position: relative;
    z-index: 2;  /* Ensure the table remains interactable */
}

/* Styling for oversized bag exclamation image */
.oversized-bag {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px;
    max-height: 20px;
    margin-left: 8px;
    vertical-align: middle;
    cursor: pointer;
    position: relative;
}

.cello-bag-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.9);  /* Dark background with slight transparency */
    color: #fff;  /* White text */
    padding: 10px 15px;  /* More padding for a spacious feel */
    border-radius: 5px;  /* Slightly rounded corners */
    font-size: 14px;  /* Adjust font size */
    line-height: 1.5;  /* Space between lines */
    max-width: 250px;  /* Set a maximum width */
    text-align: center;  /* Center the text */
    z-index: 1000;  /* Ensure it appears on top of other elements */
    display: none;  /* Hidden by default */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);  /* Add a subtle shadow */
}

.cello-bag-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;  /* Position it at the bottom of the tooltip */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;  /* Downward-pointing arrow */
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 768px) {
    .cello-bag-finder-form input {
        width: 100%;  /* Make input fields responsive */
    }

    .cello-bag-finder-table th, 
    .cello-bag-finder-table td {
        padding: 10px;
        font-size: 12px;
    }
}

/* Mobile-specific styling for screens 600px or smaller */
@media (max-width: 600px) {
    /* Hide the image column */
    .cello-bag-finder-table th:nth-child(1),
    .cello-bag-finder-table td:nth-child(1) {
        display: none; /* Hide image column */
    }

    /* Remove 'View Product' link */
    .cello-bag-finder-table td:nth-child(5) a {
        display: none; /* Remove the text link */
    }

    /* Add a 15px x 15px link image instead of the 'View Product' link */
    .cello-bag-finder-table td:nth-child(5):after {
        content: '';
        display: inline-block;
        width: 15px;  /* 15px square image */
        height: 15px;
        background-image: url('/images/link.png');
        background-size: contain;
        background-repeat: no-repeat;
        vertical-align: middle;
    }

    /* Ensure the link is clickable */
    .cello-bag-finder-table td:nth-child(5) {
        text-align: center;
        position: relative;
        padding: 0; /* Remove padding in this column */
        width: 25px; /* Narrower column for the link image */
    }

    .cello-bag-finder-table td:nth-child(5):hover:after {
        opacity: 0.7; /* Add a hover effect for better UX */
    }

    /* Reduce padding for other table cells */
    .cello-bag-finder-table th,
    .cello-bag-finder-table td {
        padding: 5px 8px; /* Reduced padding */
    }

    /* Adjust product title width to ensure Bag Size is on one line */
    .cello-bag-finder-table td:nth-child(2) {
        width: 50%; /* Make the product title column narrower */
        word-wrap: break-word; /* Prevent overflow */
    }

    /* Adjust bag size width */
    .cello-bag-finder-table td:nth-child(3) {
        width: 25%; /* Ensure Bag Size remains on one line */
        white-space: nowrap;
    }

    /* Ensure the table is still full-width */
    .cello-bag-finder-table {
        width: 100%;
        margin: 0 auto;
    }

    /* Adjust font size and padding for Contents Width and Contents Height */
    .cello-bag-finder-form label {
        font-size: 14px; /* Smaller font size for labels */
        display: inline-block;
        width: auto; /* Allow label to adjust with text size */
    }

    /* Add border to input fields */
    .cello-bag-finder-form input[type="text"] {
        font-size: 14px; /* Smaller font size for input text */
        padding: 8px;    /* Smaller padding for input fields */
        width: 60%;      /* Make input boxes smaller so labels fit on one line */
        box-sizing: border-box; /* Ensure padding and borders are considered in width */
        border: 2px solid #354357; /* Add a 2px solid border with the specified color */
        border-radius: 4px; /* Optional: Adds a slight rounding to the edges */
    }

    /* Stack unit selection buttons vertically */
    .unit-buttons {
        display: flex;
        flex-direction: column;
    }

    .unit-buttons button {
        width: 100%;
        margin-bottom: 10px;
    }
}







