/**
 * Softza Core Public Stylesheet
 * Compare Tray, Autocomplete Dropdown, Toasts, Star Pickers, Badges
 */

/* Floating Comparison Tray (Ultra Modern Glassmorphism Pill) */
.sz-compare-tray {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11, 31, 51, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #FFFFFF;
    padding: 8px 14px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 10000;
    max-width: 95vw;
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sz-tray-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.sz-tray-items {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 62vw;
    scrollbar-width: none;
}
.sz-tray-items::-webkit-scrollbar {
    display: none;
}

.sz-tray-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 10px 4px 6px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap !important;
    height: 38px;
    box-sizing: border-box;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.sz-tray-item:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
}

.sz-tray-item img,
.sz-tray-item-logo {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #FFFFFF;
    object-fit: contain;
    padding: 2px;
    box-sizing: border-box;
    flex-shrink: 0;
    display: block;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.sz-tray-title {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap !important;
    line-height: 1;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

.sz-tray-remove {
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.sz-tray-remove:hover {
    color: #EF4444;
    transform: scale(1.15);
}

.sz-tray-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sz-tray-count {
    font-size: 12px;
    font-weight: 600;
    color: #94A3B8;
    white-space: nowrap;
    padding: 0 4px;
}

.sz-tray-actions .sz-btn-compare-now {
    background: #00B67A;
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 13px;
    border-radius: 9999px;
    padding: 8px 18px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 182, 122, 0.35);
    transition: all 0.15s ease;
    border: none;
    line-height: 1;
}

.sz-tray-actions .sz-btn-compare-now:hover {
    background: #009966;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 182, 122, 0.45);
    color: #FFFFFF !important;
}

.sz-tray-clear {
    background: none;
    border: none;
    color: #94A3B8;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.15s ease;
}

.sz-tray-clear:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

/* Autocomplete Dropdown */
.sz-search-wrapper {
    position: relative;
    width: 100%;
    text-align: left;
}
.sz-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 999;
    max-height: 380px;
    overflow-y: auto;
    text-align: left;
}
.sz-ac-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    text-align: left;
}
.sz-ac-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #0B1F33;
    transition: background 0.15s ease;
    text-align: left;
}
.sz-ac-item:hover {
    background: #F1F5F9;
}
.sz-ac-logo {
    width: 32px;
    height: 32px;
    min-width: 32px;
    max-width: 32px;
    border-radius: 6px;
    object-fit: contain;
    background: #F8FAFC;
    padding: 2px;
    flex-shrink: 0;
}
.sz-ac-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.sz-ac-title {
    font-size: 14px;
    color: #0B1F33;
    text-align: left;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.3;
}
.sz-ac-cat {
    font-size: 11px;
    background: #E0E7FF;
    color: #3730A3;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0;
    font-weight: 500;
    line-height: 1.3;
}
.sz-ac-meta {
    font-size: 12px;
    color: #6B7280;
    margin: 3px 0 0 0;
    padding: 0;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    line-height: 1.3;
}
.sz-ac-meta svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.sz-ac-empty {
    padding: 16px;
    color: #6B7280;
    font-size: 13px;
    text-align: center;
}

/* Toast Notifications */
.sz-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 14px 22px;
    border-radius: 8px;
    color: #FFFFFF;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    display: none;
}
.sz-toast-success { background: #16A34A; }
.sz-toast-error { background: #DC2626; }
.sz-toast-warn { background: #D97706; }
.sz-toast-info { background: #00B67A; }

/* Star Rating Radio Picker */
.sz-star-picker {
    display: inline-flex;
    flex-direction: row-reverse;
    font-size: 30px;
    gap: 4px;
}
.sz-star-picker input {
    display: none;
}
.sz-star-picker label {
    color: #CBD5E1;
    cursor: pointer;
    transition: color 0.15s ease;
}
.sz-star-picker label:hover,
.sz-star-picker label:hover ~ label,
.sz-star-picker input:checked ~ label {
    color: #00B67A;
}

/* Active Bookmark Button State */
.sz-btn-bookmark.active {
    background: #E6F8F2 !important;
    border-color: #00B67A !important;
    color: #00B67A !important;
}
.sz-btn-bookmark.active svg {
    fill: #00B67A !important;
    stroke: #00B67A !important;
}

/* Form Feedback */
.sz-feedback-success {
    background: #DCFCE7;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #BBF7D0;
    font-size: 14px;
}
.sz-feedback-error {
    background: #FEE2E2;
    color: #991B1B;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #FECACA;
    font-size: 14px;
}
