/* Wardrobe specific styles */

.wardrobe-card-list-view {
    /* Renamed or specific logic if needed, but for now standard card stays */
}

/* 
 * NOTE: 
 * .closet-chip, .status-tabs, .mini-button have been moved to common.css
 * as they are shared with Trip Detail page.
 */

.wardrobe-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 30px;
    border: 1px solid rgba(255, 204, 224, 0.4);
    box-shadow: 0 18px 40px rgba(255, 179, 206, 0.25);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    flex-wrap: wrap;
    align-items: center;
}

.wardrobe-card__link {
    display: flex;
    text-decoration: none;
    color: inherit;
    gap: 1rem;
    flex: 1;
}

.wardrobe-card__emoji {
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wardrobe-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wardrobe-card__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.wardrobe-card__header h2 {
    margin: 0;
}

.wardrobe-card__note {
    margin: 0;
    color: var(--text-muted);
}

.wardrobe-card__stats {
    display: flex;
    gap: 1rem;
    font-weight: 600;
    color: #ff6ea3;
}

.wardrobe-card__actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
}

.wardrobe-card__actions form {
    margin: 0;
}

.wardrobe-card__actions .icon-button {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 20px rgba(255, 182, 193, 0.25);
}

@media (max-width: 600px) {
    .wardrobe-card__actions {
        flex-direction: row;
    }
}

.wardrobe-gallery {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
}

/* Specific Wardrobe Chips (if different) - keeping standard chip in common */
/* .wardrobe-chip moved to common for sharing */

.closet-app-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 32px;
    padding: 0.75rem 1rem;
    box-shadow: 0 12px 35px rgba(255, 179, 206, 0.35);
}

.closet-app-bar .app-bar-title {
    text-align: center;
    line-height: 1.1;
}

.app-bar-title p {
    margin: 0;
    font-weight: 600;
}

.app-bar-title small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.app-bar-actions {
    display: flex;
    gap: 0.4rem;
}

.view-settings,
.sort-settings {
    position: relative;
}

.card-size-popover,
.sort-popover {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 22px;
    padding: 0.8rem;
    min-width: 180px;
    box-shadow: 0 18px 40px rgba(255, 168, 198, 0.35);
    border: 1px solid rgba(255, 176, 210, 0.4);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.card-size-popover.open,
.sort-popover.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.popover-label {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #c173b4;
}

.size-chip-group {
    display: flex;
    gap: 0.4rem;
}

.size-chip {
    flex: 1;
    border: 1px solid rgba(255, 177, 213, 0.5);
    border-radius: 18px;
    padding: 0.4rem 0;
    background: rgba(255, 255, 255, 0.9);
    color: #b56390;
    font-weight: 600;
    text-align: center;
    box-shadow: inset 0 0 0 1px transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.size-chip small {
    display: block;
    font-weight: 500;
    color: #a58db0;
}

.size-chip.active {
    background: linear-gradient(135deg, rgba(255, 193, 222, 0.9), rgba(255, 153, 210, 0.9));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.size-chip:not(.active):hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

.chip-title {
    font-size: 1rem;
}

.popover-hint {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

.sort-option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sort-option {
    border: 1px solid rgba(255, 177, 213, 0.5);
    border-radius: 18px;
    padding: 0.55rem 0.85rem;
    background: rgba(255, 255, 255, 0.9);
    color: #b56390;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sort-option small {
    font-weight: 500;
    color: #a58db0;
}

.sort-option.active {
    background: linear-gradient(135deg, rgba(255, 193, 222, 0.95), rgba(255, 153, 210, 0.95));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.sort-option.active small {
    color: rgba(255, 255, 255, 0.9);
}

.sort-option:not(.active):hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.95);
}

.option-title {
    font-size: 1rem;
}

.owner-actions form {
    margin: 0;
    display: flex;
}

.closet-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 235, 243, 0.95));
    border-radius: 36px;
    padding: 1.8rem;
    box-shadow: 0 30px 60px rgba(255, 168, 198, 0.35);
    border: 1px solid rgba(255, 204, 224, 0.6);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.closet-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.closet-card__label {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.closet-card__title {
    margin: 0.2rem 0 0.2rem;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: #ff6ea3;
}

.closet-card__summary {
    margin: 0;
    color: var(--text-muted);
}

.closet-card__body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* .closet-chip removed - moved to common */

.closet-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.owner-label {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.owner-name {
    margin: 0.2rem 0 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #7a4f87;
}

.owner-actions {
    display: flex;
    gap: 0.6rem;
}

/* .mini-button moved to common */

/* .status-tabs moved to common */

.grid {
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
}

body.reorder-mode .grid {
    user-select: none;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .grid[data-card-size="large"] {
        grid-template-columns: 1fr;
    }

    .grid[data-card-size="medium"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem;
    }

    .grid[data-card-size="small"] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .grid[data-card-size="medium"] .item-media {
        border-radius: 22px;
    }

    .grid[data-card-size="medium"] .item-media img,
    .grid[data-card-size="medium"] .image-fallback {
        border-radius: 22px;
    }

    .grid[data-card-size="small"] .item-media {
        border-radius: 18px;
    }

    .grid[data-card-size="small"] .item-media img,
    .grid[data-card-size="small"] .image-fallback {
        border-radius: 18px;
    }

    .grid[data-card-size="small"] .item-card {
        gap: 0.35rem;
    }

    .grid[data-card-size="small"] .item-title {
        font-size: 0.9rem;
    }

    .grid[data-card-size="small"] .price-tag {
        font-size: 0.85rem;
    }
}

.item-card {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease;
}

.item-card:hover {
    transform: translateY(-4px);
}

.item-card.hidden-by-filter {
    display: none;
}

body.reorder-mode .item-card {
    cursor: grab;
}

.item-card.dragging {
    opacity: 0.8;
    transform: scale(1.03);
    box-shadow: 0 30px 60px rgba(255, 135, 175, 0.45);
}

.item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(253, 181, 209, 0.45);
}

.item-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 40px rgba(255, 179, 206, 0.35);
}

.item-media img,
.image-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 28px;
}

.image-fallback {
    background: linear-gradient(135deg, rgba(255, 233, 244, 0.9), rgba(255, 210, 229, 0.9));
    color: #f187b4;
    font-weight: 600;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-tag {
    font-size: 1rem;
    font-weight: 700;
    color: #ff6ea3;
    margin: 0.1rem 0 0;
    text-align: center;
}

.filter-empty-message {
    text-align: center;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
    font-weight: 600;
}

.reorder-controls {
    margin-top: 1.5rem;
    padding: 1rem 1.4rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 15px 30px rgba(255, 182, 193, 0.25);
    border: 1px dashed rgba(255, 143, 179, 0.4);
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

body.reorder-mode .reorder-controls {
    display: flex;
}

.reorder-controls p {
    margin: 0;
    color: #a16caf;
    font-weight: 600;
}

@media (max-width: 600px) {
    .reorder-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .reorder-controls .btn {
        width: 100%;
    }
}

.hero-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.item-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #6a4c78;
    margin: 0;
    text-align: center;
    line-height: 1.4;
}

/* Floating Action Button (Moved from common.css) */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 1.6rem;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #ff8fb3, #ff78a9);
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 18px 35px rgba(255, 120, 169, 0.45);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.fab:hover {
    transform: translateY(-4px) scale(1.05);
}

body.reorder-mode .fab {
    opacity: 0;
    pointer-events: none;
}