/**
 * Balloon Configurator CSS
 *
 * Scoped styles with .bc- prefix to avoid conflicts.
 * Keeps existing class names for Alpine.js template compatibility.
 */

/* ============================================================
   RESET & BASE (scoped to configurator)
   ============================================================ */
[x-cloak] { display: none !important; }

/* ============================================================
   LOADING SCREEN
   ============================================================ */
.bc-loading {
    position: absolute;
    width: 100%;
    inset: 0;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

/* ============================================================
   LAYOUT UTILITIES (minimal, no full Tailwind reset)
   ============================================================ */
.fixed { position: fixed; }
.relative { position: relative; }
.inset-0 { inset: 0; }
.z-10 { z-index: 10; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1 1 0%; }
.cursor-pointer { cursor: pointer; }
.overflow-y-auto { overflow-y: auto; }
.overflow-hidden { overflow: hidden; }

.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-10 { gap: 2.5rem; }

.p-4 { padding: 1rem; }
.ml-3 { margin-left: 0.75rem; }

.rounded-md { border-radius: 0.375rem; }
.rounded-xl { border-radius: 0.75rem; }

.bg-black { background-color: #000; }
.bg-white { background-color: #fff; }
.bg-opacity-50 { opacity: 0.5; }

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
}

.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }

.grayscale { filter: grayscale(100%); }

.disabled\:opacity-75:disabled { opacity: 0.75; }
.disabled\:opacity-40:disabled { opacity: 0.4; }

/* ============================================================
   BALLOON SELECTION & SWOLLEN
   Styles come from the theme (style.css) — DO NOT override here.
   Classes: .numb_ballons, .swollen_type, .selection-btn, etc.
   ============================================================ */

/* ============================================================
   MODAL
   ============================================================ */
.modalOpen_custom {
    max-width: 900px;
    padding: 2rem;
}

.close_modal_custom {
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    z-index: 10;
}

.grid_modal {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.modal_left {
    text-align: center;
}

.modal_left img {
    max-width: 200px;
    margin: 0 auto;
}

.modal_text h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.buttons_modal {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal_buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #fff;
}

.modal_buttons:hover {
    background: #f9fafb;
}

.modal_buttons svg {
    width: 40px;
    height: 40px;
}

.alert_max_baloane_mari {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.375rem;
    color: #92400e;
    font-size: 0.875rem;
}

.button-inapoi-modal {
    grid-column: 1 / -1;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-direction: row !important;
}

.replaceBallonPopup {
    text-align: center;
    position: relative;
}

.replaceBallonPopup img {
    max-width: 100px;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.replaceBallonPopup img:hover {
    transform: scale(1.05);
}

.remove_btn_popup {
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.remove_btn_popup:hover {
    opacity: 1;
}

.margin-top-popup {
    margin-top: 1.5rem;
}

/* ============================================================
   BALLOON SEARCH / ADDONS
   ============================================================ */
.balloon-addons {
    margin-top: 2rem;
}

.balloon-addons__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.balloon-addons_search input {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    min-width: 200px;
}

.extra_balloons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.extra_balloons figure {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
    cursor: pointer;
    margin: 0;
}

.extra_balloons figure:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.figure_top {
    padding: 0.75rem;
    text-align: center;
}

.figure_top img {
    max-width: 120px;
    height: auto;
    margin: 0 auto;
}

.marime_balon {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.plutire_balon {
    font-size: 0.7rem;
    color: #059669;
    font-weight: 500;
}

.balloon-name {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.25rem;
    color: #111;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.figure_bottom {
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.pret_balon_text {
    font-weight: 600;
    color: #EC7417;
    font-size: 0.9rem;
}

.cta_addballon {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.cta_addballon .icon svg {
    width: 16px;
    height: 16px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.bc-pagination {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
}

.bc-pagination-buttons {
    display: flex;
    gap: 0.75rem;
}

.bc-btn-pagination {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.15s;
}

.bc-btn-pagination:hover:not(:disabled) {
    background: #f9fafb;
}

.bc-btn-pagination:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ============================================================
   HIDDEN FIELDS
   ============================================================ */
.bc-hidden-fields {
    display: none;
}

/* ============================================================
   PERSONALIZATION FIELDS
   ============================================================ */
.personalization-fields {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fafafa;
}

.personalization-fields img {
    width: 50px;
    height: auto;
    flex-shrink: 0;
}

.personalization-fields .input-container {
    flex: 1;
}

.personalization-fields label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.personalization-fields input[type="text"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

/* ============================================================
   FLOAT TIME / TIMP PLUTIRE
   ============================================================ */
.timp_plutire {
    padding: 0.75rem 1rem;
    background: #fff7ed;
    border-radius: 0.375rem;
    color: #9a3412;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 0.5rem;
}

/* ============================================================
   PREVIEW / QUICK VIEW PANEL
   ============================================================ */
.preview_selection {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
}

.quick_view {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
}

.quick_view_price {
    font-weight: 700;
    font-size: 1.1rem;
}

.quick_view_selection {
    cursor: pointer;
    color: #2563eb;
    font-weight: 500;
}

.summary-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.summary_ballon_title_title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.summary_ballon_title_title img {
    width: 40px;
    height: auto;
}

.title_content h4 {
    font-size: 0.875rem;
    font-weight: 600;
}

.summary_ballon_type {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}

.summary_btns {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.summary_ballon_price {
    font-weight: 600;
    color: #EC7417;
}

.summary_btns .remove_btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #9ca3af;
    transition: color 0.15s;
}

.summary_btns .remove_btn:hover {
    color: #ef4444;
}

/* ============================================================
   PRODUCTION SELECTION TITLE
   ============================================================ */
.production-selection__title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* ============================================================
   LOADING TEXT
   ============================================================ */
.bc-loading-text {
    display: block;
    padding: 2rem;
    text-align: center;
    color: #9ca3af;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .grid_modal {
        grid-template-columns: 1fr;
    }

    .extra_balloons {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .balloon-addons__header {
        flex-direction: column;
        align-items: stretch;
    }

    .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
