/*
 * HireHop Webshop Public Styles
 *
 * This stylesheet contains general styling for the frontend webshop,
 * including layout, product display, and cart/checkout elements.
 */

/* --- General Layout & Helpers --- */
.main {
    margin: auto;
}

.clear {
    clear: both;
}

/* Responsive grid system */
[class*="col-"] {
    float: left;
    /* padding: 15px; - Removed padding here to allow more control on individual elements */
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
}

/* Default for mobile phones */
[class*="col-"] {
    width: 100%;
}

/* Heights for product boxes (consider using min-height or flexbox for better responsiveness) */
.h1 {
    height: 150px;
    display: flex; /* Use flexbox for better image centering */
    align-items: center;
    justify-content: center;
}

.h2 {
    height: 250px;
    padding: 15px; /* Add back some padding for content */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute content vertically */
}

.h3 {
    min-height: 55px; /* Use min-height for flexibility */
}

/* Basic button styling */
.btn {
    float: right;
    margin-right: 25px;
    padding: 8px 15px;
    background-color: #0073aa; /* WordPress blue */
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #005177;
}

/* Headings reset */
h1, h2, h3, h4, h5, h6 {
    text-transform: none;
    margin: 0; /* Reset default margins */
    padding: 0;
}

/* --- Product Display --- */
.prdt-img {
    max-width: 100%; /* Changed from 60% to 100% to better fill the container */
    max-height: 100%; /* Changed from 90% to 100% */
    display: block;
    margin: auto;
    object-fit: contain; /* Ensures image scales down without cropping */
    object-position: center;
}

.productname {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.price {
    font-size: 1.2em;
    color: #333;
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

/* --- Responsive Breakpoints --- */
@media only screen and (min-width: 600px) {
    /* For tablets: */
    .col-s-1 { width: 8.33%; }
    .col-s-2 { width: 16.66%; }
    .col-s-3 { width: 25%; }
    .col-s-4 { width: 33.33%; }
    .col-s-5 { width: 41.66%; }
    .col-s-6 { width: 50%; }
    .col-s-7 { width: 58.33%; }
    .col-s-8 { width: 66.66%; }
    .col-s-9 { width: 75%; }
    .col-s-10 { width: 83.33%; }
    .col-s-11 { width: 91.66%; }
    .col-s-12 { width: 100%; }
}

@media only screen and (min-width: 768px) {
    /* For desktop: */
    .col-1 { width: 8.33%; }
    .col-2 { width: 16.66%; }
    .col-3 { width: 25%; }
    .col-4 { width: 33.33%; }
    .col-5 { width: 41.66%; }
    .col-6 { width: 50%; }
    .col-7 { width: 58.33%; }
    .col-8 { width: 66.66%; }
    .col-9 { width: 75%; }
    .col-10 { width: 83.33%; }
    .col-11 { width: 91.66%; }
    .col-12 { width: 100%; }
}

/* --- Cart & Dialogs --- */
#custom-cart-dialog {
    max-height: 400px;
    overflow-y: auto;
    background-color: white; /* Ensure dialog background is white */
    border: 1px solid #ccc; /* Add a subtle border */
    box-shadow: 0 2px 8px rgba(0,0,0,0.15); /* Add a subtle shadow */
}

/* Styling for the jQuery UI dialog buttons */
.ui-dialog .ui-dialog-buttonpane button {
    /* Override default jQuery UI button styles if needed */
    padding: 8px 15px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    margin: 0 5px;
    transition: background-color 0.3s ease;
}

.ui-dialog .ui-dialog-buttonpane button:hover {
    background-color: #005177;
}

/* Specific button styles for cart dialog */
#ws_checkout_btn {
    background-color: #28a745; /* Green for checkout */
}
#ws_checkout_btn:hover {
    background-color: #218838;
}

.cancel_btn {
    background-color: #dc3545; /* Red for delete */
    color: white;
    border: none;
    border-radius: 3px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}
.cancel_btn:hover {
    background-color: #c82333;
}

/* Hide default jQuery UI close button if not needed */
.ui-dialog-titlebar-close {
    display: none;
}

/* --- Table Styling --- */
.table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1rem;
    color: #6F6F6F;
    border: 1px solid #EDF1FF;
}

.table thead {
    background-color: #deedf7; /* Light blue header */
    color: #333; /* Darker text for header */
    font-size: 0.75rem;
    font-weight: bold;
}

.table th,
.table td {
    padding: 8px;
    border: 1px solid #EDF1FF;
    text-align: left;
}

.table tbody tr:nth-child(even) {
    background-color: #f9f9f9; /* Zebra striping */
}

/* --- Checkout Form --- */
#checkout-form {
    color: #2d5357;
    font-weight: bold;
    margin: 0px;
    border-radius: 10px;
    width: 97%;
    box-shadow: 0 0 2px 2px #d9d9d9;
    padding: 15px;
}

#checkout-form label {
    padding-left: 26px;
    width: 200px;
    text-transform: uppercase;
    display: inline-block;
    font-size: 14px;
    margin-bottom: 5px; /* Space between label and input */
}

#checkout-form input[type=text],
#checkout-form input[type=file],
#checkout-form textarea,
#checkout-form input[type=date] { /* Added date input */
    width: calc(100% - 226px); /* Adjust width considering label and padding */
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px; /* Space between inputs */
}

#checkout-form p {
    margin-bottom: 10px; /* Space between form fields */
}

/* --- Utility Classes --- */
.text-right {
    text-align: right !important;
}

.bdr {
    border: 1px #6F6F6F solid;
    border-radius: 0px; /* Consider adding border-radius if desired */
    box-shadow: 0 0 2px 2px #d9d9d9;
}

.bg {
    background-color: #d9d9d9;
}

.fnt-14 {
    font-size: 14px;
}

.bold {
    font-weight: 500;
}

.bold-1 {
    font-weight: bold;
}

.mb-1 {
    margin-bottom: 15px !important;
}

.mt-1 {
    margin-top: 15px !important;
}

/* --- Tree View (Categories) --- */
ul, #myUL {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.caret {
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.caret::before {
    content: "\25B6"; /* Right-pointing triangle */
    color: var(--content-color, #333); /* Use CSS variable or fallback */
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.2s ease; /* Smooth transition for rotation */
}

.caret-down::before {
    -ms-transform: rotate(90deg);
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
}

.nested {
    display: none;
}

.active {
    display: block;
}

/* --- Webshop Specific Layout --- */
.webshop_main_div {
    max-width: 100% !important;
    margin: auto !important;
    display: flex; /* Use flexbox for main layout */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.webshop_left_div {
    width: 25%;
    padding: 20px;
    box-sizing: border-box;
}

.webshop_right_div {
    width: 75%;
    box-sizing: border-box;
}

@media only screen and (max-width: 767px) {
    .webshop_left_div,
    .webshop_right_div {
        width: 100%; /* Stack on mobile */
    }
}

.cat_comma {
    display: none; /* Used for itemprop, not visible */
}

/* --- Progress Bar (Admin-like, but could be used on frontend) --- */
#progress-bar {
    width: 100%;
    background-color: #f3f3f3;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden; /* Ensures inner bar stays within bounds */
}

#progress-bar-inner {
    height: 20px;
    text-align: center;
    line-height: 20px;
    color: white;
    background-color: #0073aa;
    width: 0%; /* Initial state */
    transition: width 0.3s ease; /* Smooth progress animation */
}

/* --- Custom Cart Button in Header --- */
#custom-cart-menu-item {
    text-align: right; /* Align button to the right */
    padding: 10px 0; /* Add some vertical padding */
}

#custom-cart-button {
    padding: 10px 20px;
    background-color: #2196F3; /* A nice blue for cart */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#custom-cart-button:hover {
    background-color: #0b7dda;
}

/* --- WordPress Admin Table Overrides (if used on frontend) --- */
.wp-list-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background-color: #fff;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.wp-list-table th,
.wp-list-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.wp-list-table th {
    text-align: left;
    font-weight: 600;
    color: #32373c;
    background-color: #f3f3f3;
}

.wp-list-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.wp-list-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Pagination styling */
.tablenav .tablenav-pages {
    float: none; /* Center pagination */
    text-align: center;
    margin: 1em 0;
}

.tablenav .tablenav-pages a,
.tablenav .tablenav-pages span.current {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ccc;
    background-color: #f7f7f7;
    text-decoration: none;
    color: #555;
    border-radius: 3px;
}

.tablenav .tablenav-pages span.current {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.tablenav .tablenav-pages a:hover {
    background-color: #e5e5e5;
}

/* Per-page dropdown */
.per-page-dropdown {
    text-align: center;
    margin-top: 1em;
    font-size: 14px;
}

.per-page-dropdown label {
    margin-right: 5px;
}

.per-page-dropdown select {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}
