/**
 * Carzuri Favorites & Saved Searches Stylesheet
 * Integrates styled elements with the Carzuri Design System foundations.
 */

/* Grid and Cards Styles */
.carzuri-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.carzuri-favorites-grid .vehicle-card {
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                margin 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                padding 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                border-width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

/* Slick Animate Out transition on card un-favorite action */
.carzuri-favorites-grid .vehicle-card.removing {
    opacity: 0 !important;
    transform: scale(0.92) translateY(12px) !important;
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    pointer-events: none;
}

/* Saved Searches styles */
.carzuri-saved-searches-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.carzuri-search-card {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.carzuri-search-card:hover {
    border-color: #cbd5e0 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-1px);
}

.carzuri-search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.carzuri-filter-pill {
    background-color: #edf2f7;
    border-radius: 9999px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

/* Toggle Switch Styles */
.cz-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.cz-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cz-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: .3s;
    border-radius: 9999px;
}

.cz-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

input:checked + .cz-slider {
    background-color: #1a202c; /* Deep core color match */
}

input:checked + .cz-slider:before {
    transform: translateX(22px);
}

/* Save This Search elements in primary filter layouts */
.carzuri-save-search-prompt {
    background-color: #f7fafc;
    border: 1px dashed #cbd5e0;
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Auth banner */
.carzuri-auth-notice {
    text-align: center;
    padding: 48px 24px;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-width: 500px;
    margin: 40px auto;
}

.carzuri-auth-notice p {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 20px;
}

/* Reusable Modal Component styles */
.cz-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.cz-modal-content {
    background-color: #ffffff;
    border-radius: 8px;
    width: 100%;
    max-width: 480px;
    padding: 28px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.cz-modal-content h3 {
    font-size: 20px;
    margin: 0 0 8px 0;
    color: #1a202c;
}

.cz-modal-desc {
    font-size: 14px;
    color: #718096;
    margin: 0 0 20px 0;
}

.cz-form-group {
    margin-bottom: 16px;
}

.cz-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
}

.cz-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 14px;
}

.cz-checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cz-checkbox-group label {
    margin-bottom: 0;
    font-weight: 500;
    font-size: 13px;
    color: #4a5568;
}

.cz-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}
