/**
 * Weblytics Pro Finder — Main Stylesheet
 *
 * Ported from shopper-style.css with wlp-finder-* class names.
 *
 * @package weblytics-pro-finder
 */

/* --- Elementor Compatibility --- */
.elementor-widget-container .wlp-finder-form,
.elementor-popup .wlp-finder-form,
.elementor-element .wlp-finder-form,
.elementor .wlp-finder-form {
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

.elementor .wlp-finder-form select {
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
    display: block !important;
}

.elementor .wlp-finder-form * { box-sizing: border-box !important; }

.elementor .wlp-finder-form label,
.elementor-widget-container .wlp-finder-form label,
.elementor-popup .wlp-finder-form label {
    display: block !important;
    width: 100% !important;
    margin-bottom: 5px !important;
}

.elementor .wlp-finder-form .wlp-finder-dropdown,
.elementor-widget-container .wlp-finder-form .wlp-finder-dropdown,
.elementor-popup .wlp-finder-form .wlp-finder-dropdown {
    display: flex !important;
    flex-direction: column !important;
}

.elementor .wlp-finder-form br { display: none !important; }

/* --- Search Form --- */
.wlp-finder-form {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    box-shadow: 0 4px 32px rgba(33,150,243,0.10), 0 1.5px 8px rgba(0,0,0,0.03);
    padding: 22px 18px 14px 18px;
    margin-bottom: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: flex-end;
    border: 1.5px solid #e3eaf7;
    transition: box-shadow 0.2s, border 0.2s;
}

.wlp-finder-form .wlp-finder-dropdown,
.wlp-finder-form .wlp-finder-field,
.elementor .wlp-finder-form .wlp-finder-dropdown,
.elementor .wlp-finder-form .wlp-finder-field {
    flex: 1 1 160px !important;
    min-width: 120px !important;
    margin-bottom: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    background: rgba(255,255,255,0.18) !important;
    border-radius: 10px !important;
    padding: 8px 10px 15px 10px !important;
    box-shadow: 0 1px 6px rgba(33,150,243,0.03) !important;
    border: 1px solid #e3eaf7 !important;
    transition: box-shadow 0.18s, border 0.18s !important;
}

.wlp-finder-form label,
.elementor .wlp-finder-form label {
    font-size: 1em !important;
    color: #1a237e !important;
    font-weight: 600 !important;
    margin-bottom: 1px !important;
    letter-spacing: 0.04em !important;
    text-shadow: 0 1px 4px rgba(255,255,255,0.18) !important;
}

.wlp-finder-form select,
.wlp-finder-form input[type="text"],
.wlp-finder-form input[type="email"],
.elementor .wlp-finder-form select,
.elementor .wlp-finder-form input[type="text"],
.elementor .wlp-finder-form input[type="email"] {
    padding: 10px 12px !important;
    border: 1.5px solid #d0e6f7 !important;
    border-radius: 7px !important;
    background: rgba(255,255,255,0.85) !important;
    font-size: 1.05em !important;
    color: #222330 !important;
    transition: border-color 0.18s, box-shadow 0.18s !important;
    outline: none !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important;
    box-shadow: 0 1px 4px rgba(31,38,135,0.04) !important;
    width: 100% !important;
    max-width: 100% !important;
}

.wlp-finder-form select:focus,
.wlp-finder-form input[type="text"]:focus,
.wlp-finder-form input[type="email"]:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33,150,243,0.13);
    background: #fff;
}

.wlp-finder-form button,
.wlp-finder-search-btn,
.elementor .wlp-finder-form button,
.elementor .wlp-finder-search-btn {
    background: linear-gradient(90deg, #2196f3 0%, #003366 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 28px !important;
    border-radius: 9px !important;
    font-size: 1.08em !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px !important;
    box-shadow: 0 2px 14px rgba(33,150,243,0.10) !important;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s !important;
    cursor: pointer !important;
}

.wlp-finder-form button:hover,
.wlp-finder-search-btn:hover {
    background: linear-gradient(90deg, #003366 0%, #2196f3 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(33,150,243,0.16);
}

.wlp-finder-form .wlp-finder-message {
    margin-top: 10px;
    font-size: 1em;
    color: #c00;
    font-weight: 500;
    text-align: left;
}

.wlp-finder-error {
    color: #c00 !important;
    font-weight: bold !important;
    margin: 20px 0 !important;
    text-align: center !important;
}

/* --- Spinner --- */
.wlp-finder-spinner {
    display: none;
    position: fixed !important;
    z-index: 9999 !important;
    left: 50% !important;
    top: 50% !important;
    width: 48px !important;
    height: 48px !important;
    transform: translate(-50%, -50%) !important;
}
.wlp-finder-spinner:after {
    content: " ";
    display: block;
    width: 40px;
    height: 40px;
    margin: 4px;
    border-radius: 50%;
    border: 4px solid #006699;
    border-color: #006699 transparent #003366 transparent;
    animation: wlp-spinner 1.2s linear infinite;
}
@keyframes wlp-spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Quick View Modal --- */
#wlp-quick-view-modal {
    display: none;
    position: fixed;
    z-index: 2147483647 !important;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(255, 255, 255, 0.806);
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.wlp-quick-view-content {
    background: rgba(255,255,255,0.18);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.18);
    border-radius: 18px;
    max-width: 420px;
    width: 92%;
    height: 100vh;
    overflow-y: auto;
    margin: 60px auto;
    padding: 28px 18px 18px 18px;
    position: relative;
    text-align: center;
    border: 1.5px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: wlpModalIn 0.22s cubic-bezier(.4,2,.6,1) 1;
    overflow: hidden;
}

@keyframes wlpModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.wlp-quick-view-body h2 {
    color: #222330;
    font-size: 1.5em;
    margin-bottom: 18px;
    margin-top: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.wlp-quick-view-body img {
    max-width: 100%;
    width: 80vw;
    height: auto;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 18px rgba(31,38,135,0.10);
    background: none !important;
}

.wlp-quick-view-close {
    position: absolute;
    top: 14px; right: 18px;
    font-size: 30px;
    background: rgba(255,255,255,0.5);
    border: none;
    color: #444;
    cursor: pointer;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    line-height: 38px;
    text-align: center;
    transition: background 0.18s, color 0.18s;
    box-shadow: 0 2px 8px rgba(31,38,135,0.08);
}
.wlp-quick-view-close:hover {
    background: #e74c3c;
    color: #fff;
}

.wlp-quick-view-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 220px;
    justify-content: flex-start;
    padding-bottom: 12px;
}

.wlp-quick-view-price {
    color: #7ecbff !important;
    font-size: 1.4em !important;
    font-weight: bold !important;
    letter-spacing: 0.2px !important;
    margin: 10px 0 8px 0 !important;
}

/* --- Relaxation message --- */
.wlp-finder-relax-msg {
    background: #ffeeba;
    color: #856404;
    padding: 12px 18px;
    border-radius: 16px;
    font-weight: bold;
    max-height: 90px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* --- Wrapper --- */
.wlp-finder-wrapper {
    display: none;
    flex-direction: column;
    background: rgba(255, 254, 254, 0.604);
    border-radius: 18px;
    font-family: Arial, sans-serif;
    padding: 8px 8px;
    width: 100%;
}
.wlp-finder-wrapper.wlp-has-results {
    display: flex;
}

/* --- Email results form --- */
.wlp-email-results-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #f7fafd;
    border: 1px solid #d0e6f7;
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 8px !important;
    box-shadow: 0 1px 4px rgba(33,150,243,0.06);
    font-size: 1em;
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
}

.wlp-email-results-form label {
    margin: 0;
    font-weight: 600;
    color: #1976d2;
}

.wlp-email-results-input {
    padding: 7px 12px;
    border: 1px solid #b3c7d6;
    border-radius: 4px;
    font-size: 1em;
    min-width: 220px;
    transition: border-color 0.2s;
}
.wlp-email-results-input:focus {
    border-color: #2196f3;
    outline: none;
}

.wlp-email-results-form button[type="submit"] {
    background: #2196f3;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 7px 18px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0;
}
.wlp-email-results-form button[type="submit"]:hover {
    background: #1769aa;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .wlp-quick-view-content {
        padding: 18px 6vw 18px 6vw;
    }
    .wlp-quick-view-close {
        top: 8px; right: 8px;
        width: 32px; height: 32px; font-size: 22px; line-height: 32px;
    }
}
