/* Custom Styles for PackIt */

/* Thumbnail styles for item images in packing list */
.thumb {
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.thumb__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hover effect for thumbnails - disabled on touch devices */
@media (hover: hover) {
    .thumb:hover {
        border-color: rgba(255, 255, 255, 0.3);
        transform: scale(1.1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
}

/* Mobile optimizations for thumbnails */
@media (max-width: 768px) {
    .thumb {
        width: 40px;
        height: 40px;
    }
}

/* Item card thumbnail styles for item list */
.item-card-thumbnail {
    height: 80px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.item-card-thumbnail-placeholder {
    height: 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile optimizations for item cards */
@media (max-width: 576px) {
    .item-card-thumbnail,
    .item-card-thumbnail-placeholder {
        height: 120px;
    }
}

/* Packing list card styles */
.packing-list-card {
    position: relative;
    transition: box-shadow 0.2s ease-in-out;
}

/* Hover effects only on devices with mouse */
@media (hover: hover) {
    .packing-list-card:hover {
        box-shadow: 0 4px 12px var(--bs-primary) !important;
    }
}

.packing-list-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.packing-list-card__link:hover {
    color: inherit;
}

.packing-list-card__link:hover .card-title {
    color: var(--bs-primary);
}

.packing-list-card__actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.packing-list-card__action-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.packing-list-card__action-btn:hover {
    transform: scale(1.1);
}

/* =================================
   Mobile Responsive Optimizations
   ================================= */

/* Better touch targets for mobile */
@media (max-width: 768px) {
    /* Increase button sizes for better touch targets */
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Stack buttons on mobile */
    .btn-group-sm > .btn {
        font-size: 0.85rem;
    }

    /* Make action buttons more touch-friendly */
    .packing-list-card__action-btn {
        width: 40px;
        height: 40px;
    }

    /* Better spacing for mobile */
    .card-body {
        padding: 1rem;
    }

    /* Responsive table improvements */
    .table-responsive {
        font-size: 0.85rem;
    }

    /* Hide less important columns on mobile */
    .col-thumb {
        width: 50px;
    }

    .col-status {
        width: 50px;
    }

    .col-quantity {
        width: 60px;
    }

    .col-actions {
        width: 50px;
    }

    /* Make badges more readable */
    .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.5em;
    }
}

/* Extra small devices (phones in portrait mode) */
@media (max-width: 576px) {
    /* Stack filter rows vertically */
    .input-group,
    .form-select {
        margin-bottom: 0.5rem;
    }

    /* Full width buttons on mobile */
    .btn-group {
        width: 100%;
        display: flex;
    }

    .btn-group .btn {
        flex: 1;
    }

    /* Reduce padding on small screens */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Smaller headings on mobile */
    h1 {
        font-size: 1.75rem;
    }

    h5 {
        font-size: 1.1rem;
    }

    /* Adjust card spacing */
    .card {
        margin-bottom: 1rem;
    }

    /* Better modal sizes */
    .modal-dialog {
        margin: 0.5rem;
    }

    /* Compact stat cards */
    .card-body h3 {
        font-size: 1.5rem;
    }

    .card-body p {
        font-size: 0.85rem;
    }

    /* Hide category column in item list tables on mobile */
    .table th:nth-child(4),
    .table td:nth-child(4) {
        display: none;
    }

    /* Hide weight column on very small screens */
    .table .col-weight {
        display: none;
    }
}

