/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Modena Design AB
Author: Modena Design AB
Author URI: https://modena.se
Template: hello-elementor
Version: 3.1
Text Domain: hello-elementor-child
*/
*,*:before,*:after{box-sizing:inherit}html{box-sizing:border-box}body{margin:0;padding:0;-webkit-font-smoothing:antialiased}article,footer,header,main,menu,nav,section{display:block}strong{font-weight:bold}img,.wp-caption{max-width:100%;height:auto;border:0}ul,ol,li>ul,li>ol{margin:0;padding:0;list-style:none}ul,ol{margin-left:20px;margin-bottom:20px}svg:not(:root){overflow:hidden}figure{margin:0}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}.site-content{overflow:hidden}

:root {
    --e-global-color-primary: #183870;
    --lightgrey: #ddd;
}

/*--------------------------------------------------------------
# CFS Autocomplete Styles
--------------------------------------------------------------*/
.cfs-autocomplete-container {
    position: relative;
    margin: 10px 0 0;
}

.cfs-autocomplete-input {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 1px solid var(--lightgrey);
    border-radius: 0;
    font-size: 16px;
}

.cfs-autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--lightgrey);
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.cfs-autocomplete-suggestion {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid var(--lightgrey);
}

.cfs-autocomplete-suggestion:hover,
.cfs-autocomplete-suggestion.active {
    background-color: #f0f0f0;
}

.cfs-autocomplete-loading {
    padding: 10px;
    text-align: center;
    color: #666;
}

/*--------------------------------------------------------------
# New Sailing Search Styles (using existing structure)
--------------------------------------------------------------*/
.sailing-search {
    margin: 20px 0;
}

.sailing-search h3 {
    margin-top: 0;
    color: var(--e-global-color-primary);
}

.search-form {
    display: flex;
    align-items: self-end;
    gap: 3rem;
}

.search-form .form-group {
    max-width: 300px;
    width: 100%;
}

.search-form label {
    display: block;  
    margin-bottom: 5px;
    font-weight: 500;
}

.sailing-search input[type=text] {
	height: 52px;
    border-radius: 0;
}


.sailing-search input[type=text]:focus,
.sailing-search input[type=text]:active,
.sailing-search input[type=text]:focus-visible {
    outline-color: var(--e-global-color-primary);
}

.sailing-search .search-btn {
    background: var(--e-global-color-primary);
    color: white;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.sailing-search .search-btn:hover:not(:disabled) {
    background: #0f2851;
}

.sailing-search .search-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.search-results {
    margin-top: 4rem;
    margin-bottom: 3rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 0;
    overflow: hidden;
}

.results-table th {
    padding: 15px 5px;
    font-size: 13px;
    color: white;
    text-transform: capitalize;
    vertical-align: middle;
    background-color: var(--e-global-color-primary);
}

.results-table td {
    padding: 15px 5px;
    font-size: 13px;
    color: black;
    vertical-align: middle;
    text-align: center;
}

.results-table tr:nth-of-type(odd) {
    background-color: #f9f9f9;
}
.results-table tr:nth-of-type(even) {
    background: #ffffff;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    background: white;
    border-radius: 8px;
    border: 2px dashed #bdc3c7;
}

.no-results h4 {
    margin-bottom: 1rem;
}

.no-results ul {
    margin: 0;
}

.loading-message {
    text-align: center;
    padding: 20px;
    color: var(--e-global-color-primary);
}

.search-results__title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.search-results__title h4 {
    margin-bottom: 5px;
}

.download-container {
    position: relative;
}

.download-link {
    color: var(--e-global-color-primary) !important;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.download-dropdown {
    position: absolute;
    top: 100%;
    right: 0px;
    background: white;
    border: 1px solid rgb(221, 221, 221);
    border-radius: 4px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 8px;
    z-index: 1000;
    min-width: 120px;
    display: none;
}

.download-option {
    display: block;
    padding: 15px 15px 13px 15px;
    text-decoration: none;
    color: black;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    line-height: 1;
    text-align: center;
    transition: all 0.3s ease;
}

.download-option:hover {
    background: hsla(0,0%,50%,.071);
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
        align-items: baseline;
        gap: 2rem;
    }
    
    .search-form .form-group {
        max-width: 100%;
        width: 100%;
    }

    .search-results__title {
        flex-direction: column;
        align-items: start;
    }
    
    .cfs-autocomplete-input {
        max-width: 100%;
    }

    .results-table {
        font-size: 14px;
    }
    
    .results-table {
        border: 0;
    }

    .results-table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }

    .results-table tr {
        border-bottom: 3px solid #ddd;
        display: block;
        margin-bottom: .625em;
    }

    .results-table td {
        padding: 6px 10px;
        border-bottom: 1px solid #ddd;
        display: block;
        text-align: right;
    }

    .results-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
    }

    .results-table td:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 500px) {
    .sailing-search input[type=text] {
        height: 46px;
    }
    .cfs-autocomplete-container {
        margin: 5px 0 0;
    }
    .sailing-search .search-btn {
        width: 100%;
    }
    .no-results {
        padding: 10px;
        font-size: 16px;
        line-height: 1.6;
    }
    .search-results {
        margin-top: 3rem;
        margin-bottom: 2rem;
    }   
}