/**
 * Custom Styles
 * Katalog Arisan Hanif Al Wafy
 */

/* Hide scrollbar for category filter */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Line clamp for product preview */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modal animation */
#modal {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

#modal.show {
    opacity: 1;
}

#modal > div:last-child {
    transform: translateY(-50%) scale(0.95);
    transition: transform 0.2s ease-out;
}

#modal.show > div:last-child {
    transform: translateY(-50%) scale(1);
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Image placeholder */
.img-placeholder {
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Better touch targets on mobile */
@media (max-width: 640px) {
    button, a {
        min-height: 44px;
    }
}

/* Admin sidebar active state */
.admin-nav-item.active {
    background-color: rgba(5, 150, 105, 0.1);
    color: #059669;
    border-left: 3px solid #059669;
}

/* Admin table styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background-color: #f9fafb;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table tr:hover {
    background-color: #f9fafb;
}

/* Form styles */
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #059669;
    color: white;
}

.btn-primary:hover {
    background-color: #047857;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-danger {
    background-color: #dc2626;
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Alert styles */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

/* Card styles */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Checkbox styling for multi-select */
.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.checkbox-item:hover {
    border-color: #059669;
    background-color: #f0fdf4;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #059669;
}

.checkbox-item.selected {
    border-color: #059669;
    background-color: #f0fdf4;
}

/* Quantity input */
.quantity-input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-align: center;
    margin-left: auto;
}

/* Stats card */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #059669;
}

.stat-card .stat-label {
    color: #6b7280;
    font-size: 14px;
    margin-top: 4px;
}
