/**
 * Public styles for JT Custom Search
 *
 * @package    JT_Custom_Search
 * @subpackage JT_Custom_Search/public/css
 */

:root {
    --jt-blue: #06A4DE;
    --jt-green: #8AC53F;
    --jt-dark-green: #659F1B;
    --jt-light-gray: #f5f7fa;
    --jt-gray: #e1e5eb;
    --jt-dark-gray: #5a6270;
    --jt-black: #2c3038;
    --jt-white: #ffffff;
    --jt-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --jt-radius: 12px;
    --jt-transition: all 0.3s ease;
}

/* Search Button */
/*.jt-custom-search-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--jt-blue);
    color: var(--jt-white);
    border: none;
    border-radius: var(--jt-radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: var(--jt-transition);
}*/

.jt-custom-search-button:hover {
    background-color: var(--jt-dark-green);
    cursor: pointer;
}

/* Search Popup */
.jt-custom-search-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.jt-custom-search-popup-content {
    background-color: var(--jt-white);
    margin: 10% auto;
    padding: 40px;
    border-radius: var(--jt-radius);
    max-width: 650px;
    position: relative;
    box-shadow: var(--jt-shadow);
    animation: popupFadeIn 0.3s ease;
}

.jt-custom-search-close {
    color: var(--jt-dark-gray);
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--jt-transition);
}

.jt-custom-search-close:hover {
    color: var(--jt-black);
    transform: rotate(90deg);
}

.jt-custom-search-columns {
    display: flex;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .jt-custom-search-column {
        padding: 0 10px;
    }
    
    .jt-custom-search-column:first-child {
        padding-left: 0;
    }
    
    .jt-custom-search-column:last-child {
        padding-right: 0;
    }
}

.jt-custom-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.jt-custom-search-input {
    flex: 1;
    padding: 15px 20px !important;
    border: 1px solid var(--jt-gray) !important;
    border-radius: 8px !important;
    font-size: 16px;
    min-width: 200px;
    transition: var(--jt-transition);
    /*box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);*/
}

.jt-custom-search-input:focus {
    border-color: var(--jt-blue) !important;
    outline: none !important;
    /*box-shadow: 0 0 0 3px rgba(6, 164, 222, 0.2) !important;*/
    background-color: #fff !important;
}

.jt-custom-search-submit {
    padding: 15px 25px;
    background-color: var(--jt-blue);
    color: var(--jt-white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: var(--jt-transition);
}

.jt-custom-search-submit:hover {
    background-color: #0497cd;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Search Results */
/*.jt-custom-search-results {
    margin-top: 40px;
    background-color: #f8f9fa;
    padding: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}*/

.jt-custom-search-results-title {
    margin-bottom: 25px;
    font-size: 28px;
    color: var(--jt-black);
    font-weight: 600;
    position: relative;
    padding-bottom: 12px;
}

.jt-custom-search-results-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--jt-blue), var(--jt-green));
    border-radius: 2px;
}

.jt-custom-search-results-title span {
    color: var(--jt-blue);
}

/* Aktív szűrők stílusai */
.jt-custom-search-active-filters {
    margin-bottom: 25px;
    padding: 15px 20px;
    background-color: var(--jt-light-gray);
    border-radius: var(--jt-radius);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.jt-custom-search-active-filters-title {
    font-weight: 600;
    color: var(--jt-dark-gray);
    margin-right: 5px;
}

.jt-custom-search-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.jt-custom-search-filter-badge {
    display: inline-flex;
    align-items: center;
    background-color: var(--jt-white);
    border: 1px solid var(--jt-gray);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    transition: var(--jt-transition);
}

.jt-custom-search-filter-label {
    color: var(--jt-dark-gray);
    margin-right: 5px;
}

.jt-custom-search-filter-value {
    color: var(--jt-blue);
    font-weight: 500;
}

.jt-custom-search-filter-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--jt-gray);
    color: var(--jt-dark-gray);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: var(--jt-transition);
}

.jt-custom-search-filter-remove:hover {
    background-color: var(--jt-blue);
    color: var(--jt-white);
}

/* További szűrési lehetőségek stílusai */
.jt-custom-search-filters {
    margin-bottom: 30px;
    padding: 25px;
    background-color: var(--jt-white);
    border-radius: var(--jt-radius);
    border: 1px solid var(--jt-gray);
}

.jt-custom-search-filters-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--jt-black);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--jt-gray);
}

.jt-custom-search-filter-group {
    background-color: #f5f7fa !important;
    padding: 20px;
    border-radius: var(--jt-radius);
    margin-bottom: 15px;
    transition: var(--jt-transition);
    border: 1px solid transparent;
    border-color: var(--jt-gray);
}

.jt-custom-search-filter-group-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--jt-blue);
    margin-bottom: 15px;
}

/* Dátumszűrő stílusok */
.jt-custom-search-date-filter form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.jt-custom-search-date-options {
    display: flex;
    gap: 10px;
    align-items: center;
}

.jt-custom-search-date-options select {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--jt-gray);
    border-radius: var(--jt-radius);
    background-color: var(--jt-white);
    font-size: 14px;
    color: var(--jt-black);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235a6270' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    padding-right: 35px;
    transition: var(--jt-transition);
}

.jt-custom-search-date-options select:focus {
    border-color: var(--jt-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(6, 164, 222, 0.1);
}

.jt-custom-search-filter-apply {
    padding: 12px 25px;
    background-color: var(--jt-blue);
    color: var(--jt-white);
    border: none;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--jt-transition);
}

.jt-custom-search-filter-apply:hover {
    background-color: #0497cd;
}

/* Egyedi dátumszűrő mezők */
.jt-custom-search-custom-date-fields {
    margin-top: 15px;
    padding: 18px;
    background-color: var(--jt-white);
    border-radius: var(--jt-radius);
    border: 1px solid var(--jt-gray);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.jt-custom-search-date-range {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.jt-custom-search-date-field {
    flex: 1;
    min-width: 200px;
}

.jt-custom-search-date-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--jt-dark-gray);
    font-weight: 500;
}

.jt-custom-search-date-field input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--jt-gray);
    border-radius: var(--jt-radius);
    font-size: 14px;
    background-color: var(--jt-white);
    cursor: pointer;
    transition: var(--jt-transition);
}

.jt-custom-search-date-field input:focus {
    border-color: var(--jt-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(6, 164, 222, 0.1);
}

/* Keresési kifejezés szerkesztő mező stílusa */
.jt-custom-search-term-edit {
    position: relative;
}

.jt-custom-search-edit-input,
input.jt-custom-search-edit-input,
.jt-custom-search-term-edit input.jt-custom-search-edit-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--jt-gray);
    border-radius: var(--jt-radius) !important;
    font-size: 15px;
    transition: var(--jt-transition);
    background-color: var(--jt-white) !important;
}

.jt-custom-search-edit-input:focus {
    border-color: var(--jt-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(6, 164, 222, 0.1);
}

/* Checkbox stílusok */
.jt-custom-search-content-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.jt-custom-search-checkbox-group {
    position: relative;
    padding: 5px 0;
}

.jt-custom-search-checkbox-group label {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    color: var(--jt-black);
    padding-left: 35px;
    user-select: none;
}

.jt-custom-search-checkbox-group input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    z-index: -1;
}

.jt-custom-search-checkbox-group label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 2px solid var(--jt-gray);
    border-radius: 6px;
    background-color: var(--jt-white);
    transition: var(--jt-transition);
}

.jt-custom-search-checkbox-group label:after {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-65%) rotate(45deg);
    width: 6px;
    height: 12px;
    border: solid var(--jt-white);
    border-width: 0 2px 2px 0;
    opacity: 0;
    transition: var(--jt-transition);
}

/* Használjuk a :checked pszeudo-osztályt közvetlenül */
.jt-custom-search-checkbox-group input[type="checkbox"]:checked ~ label:before {
    background-color: var(--jt-blue);
    border-color: var(--jt-blue);
}

.jt-custom-search-checkbox-group input[type="checkbox"]:checked ~ label:after {
    opacity: 1;
}

.jt-custom-search-checkbox-group input[type="checkbox"]:focus ~ label:before {
    box-shadow: 0 0 0 3px rgba(6, 164, 222, 0.1);
}

/* Reszponzív elrendezés */
.jt-custom-search-filter-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.jt-custom-search-filter-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .jt-custom-search-filter-row {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .jt-custom-search-filter-group {
        flex: 1;
        min-width: 300px;
    }
}

/* Aktív szűrők stílusa */
.jt-custom-search-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding: 18px;
    background-color: var(--jt-light-gray);
    border-radius: var(--jt-radius);
    border: 1px solid var(--jt-gray);
}

.jt-custom-search-active-filters-title {
    font-weight: 600;
    color: var(--jt-dark-gray);
    margin-right: 5px;
}

.jt-custom-search-active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.jt-custom-search-active-filter {
    display: flex;
    align-items: center;
    background-color: var(--jt-white);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--jt-black);
    border: 1px solid var(--jt-gray);
    transition: var(--jt-transition);
}

.jt-custom-search-remove-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: var(--jt-gray);
    border-radius: 50%;
    color: var(--jt-dark-gray);
    font-size: 14px;
    margin-left: 8px;
    cursor: pointer;
    transition: var(--jt-transition);
}

.jt-custom-search-remove-filter:hover {
    background-color: var(--jt-blue);
    color: var(--jt-white);
    transform: rotate(90deg);
}

.jt-custom-search-results-count {
    margin-bottom: 30px;
    font-size: 16px;
    color: var(--jt-dark-gray);
    background-color: var(--jt-light-gray);
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
}

.jt-custom-search-result-item {
    margin-bottom: 40px;
    padding: 25px;
    border-radius: var(--jt-radius);
    position: relative;
    background-color: var(--jt-white);
    /* box-shadow: var(--jt-shadow); */
    transition: var(--jt-transition);
    border: 1px solid transparent;
}

/* Különböző találati típusok megkülönböztetése */
.jt-custom-search-result-item.post,
.jt-custom-search-result-item.page,
.jt-custom-search-result-item.attachment,
.jt-custom-search-result-item.document,
.jt-custom-search-result-item.user-result {
    border-color: rgba(0,0,0,.2);
}

.jt-custom-search-result-type {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Különböző találati típusok címkéi */
.page .jt-custom-search-result-type {
    background-color: rgba(138, 197, 63, 0.1);
    color: var(--jt-dark-green);
}

.post .jt-custom-search-result-type {
    background-color: rgba(6, 164, 222, 0.1);
    color: var(--jt-blue);
}

.attachment .jt-custom-search-result-type {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--jt-black);
}

.user-result .jt-custom-search-result-type {
    background-color: rgba(255, 152, 0, 0.1);
    color: #E65100;
}

.document .jt-custom-search-result-type {
    background-color: rgba(156, 39, 176, 0.1);
    color: #7B1FA2;
}

.jt-custom-search-result-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.3em;
    padding-right: 100px; /* Helyet hagyunk a típus címkének */
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.jt-custom-search-result-title a {
    color: var(--jt-black);
    text-decoration: none;
    transition: var(--jt-transition);
    display: inline-block;
}

.jt-custom-search-result-title a:hover {
    color: var(--jt-blue);
    text-decoration: none;
}

.jt-custom-search-pdf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    color: #E53935;
    font-weight: bold;
    background-color: rgba(229, 57, 53, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.jt-custom-search-result-meta {
    font-size: 14px;
    color: var(--jt-dark-gray);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.jt-custom-search-result-meta span {
    display: inline-flex;
    align-items: center;
}

.jt-custom-search-result-content {
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--jt-black);
    font-size: .9rem;
}

.jt-custom-search-posts-column .jt-custom-search-result-content,
.jt-custom-search-pages-column .jt-custom-search-result-content {
    display: none;
}

.jt-custom-search-result-thumbnail {
    max-width: 180px;
    margin-bottom: 20px;
    border-radius: var(--jt-radius);
    overflow: hidden;
}

.jt-custom-search-result-thumbnail img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: var(--jt-transition);
}

.jt-custom-search-result-thumbnail img:hover {
    transform: scale(1.05);
}

.jt-custom-search-read-more,
.jt-custom-search-download {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background-color: var(--jt-light-gray);
    color: var(--jt-black);
    border-radius: var(--jt-radius);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    transition: var(--jt-transition);
}

.jt-custom-search-read-more:hover,
.jt-custom-search-download:hover {
    background-color: var(--jt-gray);
    /*transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);*/
}

.jt-custom-search-download {
    background-color: var(--jt-blue);
    color: var(--jt-white);
}

.jt-custom-search-download:hover {
    background-color: var(--jt-dark-green);
}

.jt-custom-search-pagination {
    margin-top: 40px;
    text-align: center;
}

.jt-custom-search-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border: 2px solid var(--jt-gray);
    color: var(--jt-dark-gray);
    text-decoration: none;
    border-radius: 50%;
    font-weight: 500;
    transition: var(--jt-transition);
}

.jt-custom-search-pagination .page-numbers.current {
    background-color: var(--jt-blue);
    color: var(--jt-white);
    border-color: var(--jt-blue);
}

.jt-custom-search-pagination .page-numbers:hover:not(.current) {
    border-color: var(--jt-blue);
    color: var(--jt-blue);
    background-color: rgba(6, 164, 222, 0.05);
}

.jt-custom-search-no-results,
.jt-custom-search-no-query {
    padding: 30px;
    background-color: var(--jt-light-gray);
    border-radius: var(--jt-radius);
    text-align: center;
    border: 2px dashed var(--jt-gray);
    margin: 30px 0;
}

.jt-custom-search-no-results p,
.jt-custom-search-no-query p {
    font-size: 18px;
    color: var(--jt-dark-gray);
    margin: 0;
}

/* User Search Results */
.jt-custom-search-result-user-info {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 25px;
}

.jt-custom-search-result-user-info img.avatar {
    margin-right: 0;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
    transition: var(--jt-transition);
}

.jt-custom-search-result-user-details {
    flex: 1;
    background-color: var(--jt-light-gray);
    padding: 20px;
    border-radius: var(--jt-radius);
    position: relative;
}

.jt-custom-search-result-user-details::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 20px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid var(--jt-light-gray);
}

.jt-custom-search-result-user-description {
    margin-bottom: 15px;
    font-size: 15px;
    color: var(--jt-dark-gray);
    line-height: 1.6;
}

.jt-custom-search-result-user-skills,
.jt-custom-search-result-user-phone {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--jt-black);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jt-custom-search-result-user-skills strong,
.jt-custom-search-result-user-phone strong {
    color: var(--jt-blue);
}

.jt-custom-search-view-profile {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--jt-blue);
    color: var(--jt-white);
    border-radius: var(--jt-radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--jt-transition);
    box-shadow: var(--jt-shadow);
    margin-top: 10px;
}

.jt-custom-search-view-profile:hover {
    background-color: var(--jt-dark-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    color: var(--jt-white);
    text-decoration: none;
}
