/* One Search Widget Styles */

.oe-search-wrapper {
    display: inline-flex;
    align-items: center;
    position: relative;
}

/* Search Trigger Icon */
.oe-search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffffff;
    font-size: 24px;
    padding: 0;
    outline: none;
}

.oe-search-trigger:hover {
    opacity: 0.8;
}

.oe-search-trigger svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.oe-search-trigger img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Search Modal */
.oe-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.oe-search-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.oe-search-modal-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    animation: modalSlideDown 0.4s ease forwards;
}

.oe-search-modal.active .oe-search-modal-content {
    animation: modalSlideUp 0.4s ease forwards;
}

@keyframes modalSlideUp {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes modalSlideDown {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(50px);
        opacity: 0;
    }
}

/* Close Button */
.oe-search-modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 30px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.oe-search-modal-close:hover {
    opacity: 0.7;
    transform: rotate(90deg);
}

.oe-search-modal-close svg {
    width: 30px;
    height: 30px;
}

/* Search Form */
.oe-search-modal-form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Search Input */
.oe-search-modal-input {
    width: 100%;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 24px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.oe-search-modal-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.oe-search-modal-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.oe-search-modal-input:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.oe-search-modal-input::-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Submit Button */
.oe-search-modal-submit {
    width: 100%;
    padding: 20px 40px;
    background: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: inherit;
}

.oe-search-modal-submit:hover {
    background: #005177;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.oe-search-modal-submit:active {
    transform: translateY(0);
}

/* Body Lock when Modal is Open */
body.oe-search-modal-open {
    overflow: hidden;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .oe-search-modal {
        padding: 15px;
    }

    .oe-search-modal-content {
        max-width: 100%;
    }

    .oe-search-modal-input {
        font-size: 18px;
        padding: 15px 20px;
    }

    .oe-search-modal-submit {
        font-size: 16px;
        padding: 15px 30px;
    }

    .oe-search-modal-close {
        top: 15px;
        right: 15px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }

    .oe-search-modal-close svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .oe-search-modal-input {
        font-size: 16px;
        padding: 12px 15px;
    }

    .oe-search-modal-submit {
        font-size: 14px;
        padding: 12px 25px;
        margin-top: 15px;
    }
}

/* Accessibility */
.oe-search-trigger:focus,
.oe-search-modal-close:focus,
.oe-search-modal-input:focus,
.oe-search-modal-submit:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Loading State (Optional) */
.oe-search-modal-submit.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.oe-search-modal-submit.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
