/*!
Theme Name: Kadence Child
Theme URI: https://www.kadencewp.com/kadence-theme/
Template: kadence
Author: Kadence WP
Author URI: https://www.kadencewp.com/
Description: A child theme for the Kadence Theme.
Version: 1.0.0
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: kadence-child
*/

/* Theme customization starts here
-------------------------------------------------------------- */
/* Remove dots and align flags horizontally */
.header-poly-switcher {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    gap: 10px; /* Space between flags */
    align-items: center;
}

.header-poly-switcher li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
}

/* Remove any empty space/paragraphs created by the HTML block */
.header-html-inner p {
    display: none !important;
}
.header-html-inner p:has(ul), 
.header-html-inner p:has(img) {
    display: contents !important;
}

/* Make the flags look clean */
.header-poly-switcher img {
    display: block;
    width: 22px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Align Footer Contact Block to the Left */
.site-bottom-footer-inner-wrap {
  padding: 30px 0 30px 0; 
  grid-column-gap: 30px;
}
.footer-contact-block {
    text-align: left !important;
}

.footer-contact-block h6 {
    text-align: left !important;
    margin-bottom: 15px;
    font-weight: bold;
}

.footer-contact-block p {
    display: flex !important;
    align-items: left !important;
    justify-content: flex-start !important; /* Forces items to the left */
    text-align: left !important;
    margin-bottom: 8px;
    padding: 0;
}

.footer-contact-block i {
    width: 25px; /* Fixed width keeps the text aligned in a straight column */
    margin-right: 10px;
    text-align: center; /* Centers the icon inside its 25px box */
    flex-shrink: 0; /* Prevents icon from squishing on mobile */
}
.footer-contact-block {
    text-align: left !important;
    max-width: fit-content; /* Only takes up as much room as the text needs */
    margin-left: auto;      /* These two lines center the block */
    margin-right: auto;     /* within the 1/4 column space */
}

/* Teenused image sama suurus
img.attachment-large.size-large {
    width: 100%;
    aspect-ratio: 16 / 9; /* Stays a rectangle on all devices
    object-fit: cover;
} */

/* Active menu item */
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
    font-weight: 600;
    color: #145FAB !important;
}

/*Tabel*/

/* Responsive Wrapper */
.table-responsive-container {
    width: 100%;
    overflow-x: auto; /* Allows side-scrolling on mobile */
    -webkit-overflow-scrolling: touch;
}

/* Table Styling */
.custom-price-table {
    width: 100%;
    border-collapse: collapse;
    font-family: sans-serif;
    min-width: 600px; /* Ensures table doesn't get too squished */
}

/* Header Styling */
.custom-price-table thead th {
    background-color: #f4f4f4;
    padding: 15px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
}

/* Cell Styling */
.custom-price-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

/* Text Align Center for prices */
.text-center {
    text-align: center;
}

/* Zebra Stripes */
.custom-price-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* Spacer Row Styling */
.custom-price-table tr.spacer td {
    height: 20px;
    background-color: transparent !important;
    border: none;
}

/* Hover effect */
.custom-price-table tbody tr:hover {
    background-color: #f0f7ff;
}

/* ===== DESKTOP ===== */
.custom-price-table {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 768px) {

    .table-responsive-container {
        display: block !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important; 
        box-sizing: border-box !important;
        padding: 10px !important;
    }

    .custom-price-table {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important; /* Forces the table to wrap text */
        min-width: 0 !important;        /* Prevents content from pushing width */
        border: none !important;
        border-collapse: collapse !important;
    }

    .custom-price-table td {
        padding: 12px 15px;
        border-bottom: none;
    }

    /* Each row is a card */
    .table-responsive-container .custom-price-table tr {
        display: block;
        width: 100%;
        min-width: 0;          /* key fix */
        margin-bottom: 16px;
        padding: 12px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
        box-sizing: border-box;
    }

    /* Hide headers */
    .table-responsive-container .custom-price-table thead {
        display: none;
    }

    /* Each cell as block + force wrap */
    .table-responsive-container .custom-price-table td {
        display: block;
        width: 100%;
        min-width: 0;          /* key fix for text wrapping */
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        text-align: center;
    }

    /* Add label before second and third cells */
    .table-responsive-container .custom-price-table td:nth-child(2)::before {
        content: "Hind tööajal: ";
        display: inline;
    }

    .table-responsive-container .custom-price-table td:nth-child(3)::before {
        content: "Hind väljaspool tööaega: ";
        display: inline;
    }

    /* Service name bold + margin */
    .table-responsive-container .custom-price-table td:first-child {
        font-weight: 700;
        margin-bottom: 6px;
        white-space: normal !important;
        text-align: center;
        border-bottom: 1px solid #eee;
    }

    .footer-contact-block h6 {
            margin-top: 20px;
    }
}


/*Desktop: Expand the footer wider than the standard site-container */
@media (min-width: 1200px) {
    .site-footer .site-container {
        max-width: 1900px !important; /* Adjust this to your desired width */
        width: 95% !important;
        margin-left: auto;
        margin-right: auto;
    }
}

/*Tablet & Mobile: Ensure it fits the screen and doesn't scroll sideways */
@media (max-width: 1199px) {
    .site-footer .site-container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 20px; /* Provides a small safety gap on the edges */
        padding-right: 20px;
    }
}