/**
 * Side Finder Tab - Header inline styles + Modal form
 */

/* Adjust search bar and cart widths to fit the tab in one row */
.header-top #_desktop_search_plugin.col-lg-4 {
    width: 22%;
}

#header div#_desktop_cart {
    width: 22%;
}

.side-finder-tab {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    float: left;
    width: 22%;
    padding: 30px 0 30px 0;
    text-decoration: none;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    transition: opacity 0.2s ease;
    white-space: normal;
    line-height: 1;
    background: transparent !important;
}

.side-finder-tab:hover {
    text-decoration: none;
    opacity: 0.85;
}

.side-finder-tab:visited,
.side-finder-tab:active,
.side-finder-tab:focus {
    text-decoration: none;
    color: inherit;
}

.side-finder-tab__text {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.4;
    text-transform: none;
    padding: 12px 20px;
    border-radius: 6px;
}

/* Mobile: hide tab and restore widths */
@media (max-width: 991px) {
    .side-finder-tab {
        display: none;
    }

    .header-top #_desktop_search_plugin.col-lg-4 {
        width: auto;
    }

    #header div#_desktop_cart {
        width: 33.333%;
    }
}

/* ============================================
   MODAL STYLES
   ============================================ */

.sf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sf-modal {
    background: #fff;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Header */
.sf-modal__header {
    padding: 25px 30px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.sf-modal__title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0;
    line-height: 1.3;
}

.sf-modal__close {
    background: none;
    border: none;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.sf-modal__close:hover {
    background: #f0f0f0;
}

/* Body */
.sf-modal__body {
    padding: 0 30px 20px;
    overflow-y: auto;
    flex: 1;
}

/* Form fields */
.sf-form-group {
    margin-bottom: 18px;
}

.sf-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    margin-bottom: 6px;
    text-align: left;
}

.sf-required {
    color: #333;
}

.sf-form-group input[type="text"],
.sf-form-group input[type="email"],
.sf-form-group input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    text-align: left;
}

.sf-form-group input:focus {
    border-color: #999;
    background: #fff;
}

/* Checkboxes */
.sf-checkbox-group {
    margin-top: 20px;
    margin-bottom: 15px;
}

.sf-checkbox {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}

.sf-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 1px;
    cursor: pointer;
    accent-color: #333;
}

.sf-checkbox span {
    flex: 1;
    text-align: left;
}

.sf-checkbox a {
    color: #c0392b;
    text-decoration: none;
}

.sf-checkbox a:hover {
    text-decoration: underline;
}

/* Info row */
.sf-form-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.sf-info-text {
    font-size: 12px;
    color: #999;
}

.sf-clear-link {
    font-size: 12px;
    color: #c0392b;
    text-decoration: none;
    cursor: pointer;
}

.sf-clear-link:hover {
    text-decoration: underline;
}

/* Alert */
.sf-form-alert {
    padding: 12px 16px;
    margin-top: 15px;
    border-radius: 4px;
    font-size: 13px;
}

.sf-form-alert.sf-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sf-form-alert.sf-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
.sf-modal__footer {
    padding: 18px 30px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.sf-btn {
    padding: 12px 35px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.2s;
    text-transform: uppercase;
}

.sf-btn:hover {
    opacity: 0.85;
}

.sf-btn--cancel {
    background: #888;
    color: #fff;
}

.sf-btn--submit {
    background: #e74c3c;
    color: #fff;
}

.sf-btn--submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Modal responsive */
@media (max-width: 600px) {
    .sf-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .sf-modal__header,
    .sf-modal__body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sf-modal__footer {
        padding: 15px 20px;
    }
}
