/* =========================================================
   COMPONENT — HEADER LAYOUT
   ========================================================= */

/**
 * Base header container.
 * Serves as a wrapper for banner and logo elements.
 */
header {
    position: relative;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 0;
}


/* =========================================================
   COMPONENT — BANNER (HERO IMAGE)
   ========================================================= */

/**
 * Main banner area displaying restaurant cover image.
 */
.banner {
    width: 100%;
    height: 200px;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/**
 * Fallback background when no banner image is provided.
 */
.banner:not([style*="background-image"]) {
    background-color: #e5e4e4;
}


/* =========================================================
   ADMIN — BANNER PREVIEW
   ========================================================= */

/**
 * Preview container for banner image in admin panel.
 */
.banner-preview {
    width: 100%;
    min-height: 80px;
    text-align: center;
}

/**
 * Banner preview image styling.
 */
.banner-preview img {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 10px;
    border-radius: 5px;
}


/* =========================================================
   COMPONENT — LOGO OVERLAY
   ========================================================= */

/**
 * Circular logo displayed on top of the banner.
 * Positioned centrally and overlaps banner bottom.
 */
.logo {
    position: absolute;
    top: 125px;
    left: 50%;
    transform: translateX(-50%);

    width: 160px;
    height: 160px;

    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
}

/**
 * Logo image styling inside circular container.
 */
.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* =========================================================
   RESPONSIVE — SMALL SCREENS
   ========================================================= */

/**
 * Adjusts banner height and logo size on small devices.
 */
@media (max-width: 480px) {

    .banner {
        height: 150px;
    }

    .logo {
        width: 125px;
        height: 125px;
        top: 85px;
    }
}


/* =========================================================
   ADMIN — BANNER CROPPER MODAL
   ========================================================= */

/**
 * Fullscreen overlay modal for banner image cropping.
 */
.banner-modal {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.6);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;
}

/**
 * Banner cropper modal content container.
 */
.banner-modal-content {
    position: relative;

    width: 90%;
    max-width: 700px;
    max-height: 90vh;

    background: #fff;
    padding: 25px;
    border-radius: 12px;

    overflow-y: auto;
}

/**
 * Compact layout for desktop screens.
 */
@media (min-width: 1024px) {
    .banner-modal-content {
        max-width: 500px;
        padding: 20px;
    }
}

/**
 * Modal title styling.
 */
.banner-modal-title {
    text-align: center;
    margin-bottom: 20px;
}

/**
 * Close icon inside banner modal.
 */
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;

    font-size: 22px;
    color: #666;
    cursor: pointer;
}

/**
 * Container for cropper image.
 */
.banner-cropper-container img {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/**
 * Action buttons container inside modal.
 */
.banner-modal-actions {
    margin-top: 20px;

    display: flex;
    justify-content: center;
    gap: 15px;
}

/**
 * Individual action button (rotate, zoom, confirm, etc.).
 */
.banner-action-btn {
    width: 50px;
    height: 50px;

    border-radius: 10px;
    border: none;

    font-size: 22px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #007bff;
    color: #fff;
}

/**
 * Hover state for banner action buttons.
 */
.banner-action-btn:hover {
    background-color: #005fcc;
}


/* =========================================================
   ADMIN — LOGO CROPPER MODAL
   ========================================================= */

/**
 * Fullscreen overlay modal for logo cropping.
 */
.logo-modal {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.6);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;
}

/**
 * Logo cropper modal content container.
 */
.logo-modal-content {
    position: relative;

    width: 90%;
    max-width: 400px;
    max-height: 90vh;

    background: #fff;
    padding: 20px;
    border-radius: 12px;

    text-align: center;
    overflow-y: auto;
}

/**
 * Modal title styling.
 */
.logo-modal-title {
    margin-bottom: 15px;
}

/**
 * Close icon inside logo modal.
 */
.logo-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;

    font-size: 22px;
    color: #666;
    cursor: pointer;
}


/* =========================================================
   LOGO CROPPER — IMAGE AREA
   ========================================================= */

/**
 * Container defining crop area for logo image.
 */
.logo-cropper-container {
    position: relative;
    width: 300px;
    height: 300px;

    margin: 0 auto;
    overflow: hidden;
}

/**
 * Overrides Cropper.js internal containers to prevent overflow.
 */
.logo-cropper-container .cropper-bg,
.logo-cropper-container .cropper-wrap-box,
.logo-cropper-container .cropper-canvas {
    overflow: hidden !important;
}

/**
 * Circular crop area to produce round logos.
 */
.logo-cropper-container .cropper-view-box {
    border-radius: 50% !important;
    overflow: hidden;
}

/**
 * Dark overlay outside crop area.
 */
.logo-cropper-container .cropper-modal {
    background-color: rgba(0, 0, 0, 0.89) !important;
}


/* =========================================================
   LOGO CROPPER — ACTION BUTTONS
   ========================================================= */

/**
 * Container for logo cropper action buttons.
 */
.logo-modal-actions {
    margin-top: 15px;

    display: flex;
    justify-content: center;
    gap: 10px;
}

/**
 * Individual action button for logo editing.
 */
.logo-action-btn {
    width: 50px;
    height: 50px;

    border-radius: 10px;
    border: none;

    font-size: 22px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #007bff;
    color: #fff;
}

/**
 * Hover state for logo action buttons.
 */
.logo-action-btn:hover {
    background-color: #005fcc;
}