/**
 * Yacht Search Elementor Widget
 */

.yse-search-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.yse-search-wrapper *,
.yse-search-wrapper *::before,
.yse-search-wrapper *::after {
    box-sizing: border-box;
}

.yse-search-form {
    width: 100%;
    display: grid;
    grid-template-columns:
        minmax(220px, 1.5fr)
        minmax(180px, 1fr)
        minmax(160px, 0.8fr)
        auto;

    align-items: end;

    gap: 10px;

    margin: 0;
}

.yse-search-field {
    min-width: 0;
}

.yse-field-label {
    display: block;

    margin: 0 0 6px 2px;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;

    letter-spacing: 0.01em;

    color: #333;
}

.yse-field-control {
    position: relative;

    width: 100%;

    display: flex;
    align-items: center;
}

.yse-field-icon {
    position: absolute;

    left: 13px;

    top: 50%;

    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    color: #777;

    pointer-events: none;

    z-index: 2;
}

.yse-input,
.yse-select {
    width: 100%;

    height: 48px;

    min-height: 48px;

    padding: 0 14px 0 40px;

    margin: 0;

    border: 1px solid #dedede;

    border-radius: 8px;

    outline: none;

    background: #ffffff;

    color: #222;

    font-size: 14px;

    line-height: 48px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;

    appearance: none;

    -webkit-appearance: none;
}

.yse-input::placeholder {
    color: #999;
}

.yse-input:focus,
.yse-select:focus {
    border-color: #999;

    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.06);
}

.yse-select {
    cursor: pointer;

    padding-right: 38px;

    background-image:
        linear-gradient(45deg, transparent 50%, #777 50%),
        linear-gradient(135deg, #777 50%, transparent 50%);

    background-position:
        calc(100% - 17px) 20px,
        calc(100% - 12px) 20px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat: no-repeat;
}

.yse-search-button-wrapper {
    display: flex;
    align-items: flex-end;
}

.yse-search-button {
    height: 48px;

    min-height: 48px;

    padding: 0 22px;

    border: 0;

    border-radius: 8px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    cursor: pointer;

    white-space: nowrap;

    background: #111111;

    color: #ffffff;

    font-size: 14px;

    font-weight: 600;

    line-height: 1;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.yse-search-button:hover {
    background: #333333;

    color: #ffffff;

    transform: translateY(-1px);

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.12);
}

.yse-search-button:active {
    transform: translateY(0);
}

.yse-search-button:focus-visible {
    outline: 2px solid #111111;

    outline-offset: 3px;
}

.yse-button-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;
}

/*
 * Elementor editor
 */
.elementor-editor-active
.yse-search-wrapper {
    z-index: 1;
}

/*
 * Tablet
 */
@media (max-width: 1024px) {

    .yse-search-form {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .yse-search-button-wrapper {
        grid-column: span 2;
    }

    .yse-search-button {
        width: 100%;
    }
}

/*
 * Mobile
 */
@media (max-width: 767px) {

    .yse-search-form {
        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 10px;
    }

    .yse-search-field {
        width: 100%;
    }

    .yse-search-button-wrapper {
        width: 100%;
    }

    .yse-search-button {
        width: 100%;
    }

    .yse-input,
    .yse-select,
    .yse-search-button {
        height: 46px;

        min-height: 46px;
    }
}

.yse-destination-field .yse-field-control {
    position: relative;
}

.yse-destination-loader {
    position: absolute;

    right: 14px;
    top: 50%;

    width: 16px;
    height: 16px;

    margin-top: -8px;

    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: #333;

    border-radius: 50%;

    display: none;

    pointer-events: none;
}

.yse-destination-loader.is-loading {
    display: block;

    animation: yse-spin 0.7s linear infinite;
}

@keyframes yse-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.yse-destination:disabled {
    cursor: wait;

    opacity: 0.7;
}