/**
 * Item Detail Popup Styles
 * Beautiful modal for displaying menu item details
 */

/* Modal Overlay */
.item-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.item-detail-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Content */
.item-detail-content {
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.item-detail-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 32px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.item-detail-close:hover {
    background: var(--primary-color, #e63946);
    color: white;
    transform: rotate(90deg);
}

/* Modal Layout */
.item-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

/* Item Image */
.item-detail-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.item-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-detail-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
}

/* Item Info */
.item-detail-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.item-detail-category {
    font-size: 14px;
    color: var(--primary-color, #e63946);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.item-detail-info h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color, #1d3557);
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.item-detail-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color, #e63946);
    margin-bottom: 25px;
}

/* Description */
.item-detail-description {
    margin-bottom: 25px;
}

.item-detail-description h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color, #1d3557);
    margin: 0 0 10px 0;
}

.item-detail-description p {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* Meta Information */
.item-detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--secondary-color, #f1faee);
    border-radius: 10px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-color, #1d3557);
}

.meta-icon {
    font-size: 18px;
}

/* Sections */
.item-detail-section {
    margin-bottom: 20px;
}

.item-detail-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color, #1d3557);
    margin: 0 0 8px 0;
}

.item-detail-section p {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

/* Actions */
.item-detail-actions {
    margin-top: auto;
    padding-top: 25px;
    display: flex;
    gap: 15px;
}

.item-detail-actions .btn {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.item-detail-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .item-detail-content {
        max-height: 95vh;
        border-radius: 15px;
    }

    .item-detail-layout {
        grid-template-columns: 1fr;
    }

    .item-detail-image {
        height: 250px;
    }

    .item-detail-info {
        padding: 25px;
    }

    .item-detail-info h2 {
        font-size: 24px;
    }

    .item-detail-price {
        font-size: 24px;
    }

    .item-detail-actions {
        flex-direction: column;
    }

    .item-detail-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .item-detail-modal {
        padding: 10px;
    }

    .item-detail-info {
        padding: 20px;
    }

    .item-detail-info h2 {
        font-size: 20px;
    }

    .item-detail-price {
        font-size: 20px;
    }

    .item-detail-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* Scrollbar Styling */
.item-detail-content::-webkit-scrollbar {
    width: 8px;
}

.item-detail-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.item-detail-content::-webkit-scrollbar-thumb {
    background: var(--primary-color, #e63946);
    border-radius: 10px;
}

.item-detail-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color, #e63946);
    opacity: 0.8;
}

/* Loading State */
.item-detail-image.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Empty State */
.item-detail-image img[src=""],
.item-detail-image img:not([src]) {
    opacity: 0;
}
