/* components.css — Toast, lightbox, modals, dropbox picker, rules, examples, settings, sessions */

/* TOAST */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    background: var(--dark);
    color: var(--white);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    z-index: 100;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ─── LIGHTBOX ─── */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 200;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-overlay.active { display: flex; }

.lightbox-close {
    position: absolute;
    top: 16px; right: 24px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    z-index: 210;
    background: none;
    border: none;
    line-height: 1;
}

.lightbox-close:hover { color: var(--gray-300); }

.lightbox-img-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 60px 80px 20px;
    position: relative;
}

.lightbox-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
    color: #fff;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-info {
    padding: 12px 24px 20px;
    text-align: center;
    color: #fff;
    width: 100%;
}

.lightbox-info-area {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.lightbox-info-desc {
    font-size: 13px;
    color: var(--gray-400);
}

.lightbox-info-seq {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Dropbox Picker */
.dbx-group { margin-bottom: 6px; }
.dbx-group-header {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; cursor: pointer; border-radius: 10px;
    background: #f8fafc; border: 1px solid #e5e7eb;
    transition: background 0.15s;
}
.dbx-group-header:hover { background: #eff6ff; border-color: #bfdbfe; }
.dbx-group-check {
    width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0;
    border: 2px solid #d1d5db; display: flex; align-items: center;
    justify-content: center; font-size: 13px; font-weight: 700; color: #fff;
    transition: all 0.15s;
}
.dbx-group-check.checked { background: #0061FF; border-color: #0061FF; }
.dbx-group-check.partial { background: #93c5fd; border-color: #60a5fa; }
.dbx-group-photos {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px; padding: 10px 14px 10px 50px;
}
.dbx-thumb {
    position: relative; border-radius: 8px; overflow: hidden;
    cursor: pointer; border: 2px solid #e5e7eb; aspect-ratio: 1;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.dbx-thumb:hover { border-color: #0061FF; box-shadow: 0 2px 8px rgba(0,97,255,0.15); }
.dbx-thumb.selected { border-color: #0061FF; box-shadow: 0 0 0 3px rgba(0,97,255,0.2); }
.dbx-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dbx-check {
    position: absolute; top: 5px; right: 5px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(255,255,255,0.85); border: 2px solid #d1d5db;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff;
}
.dbx-thumb.selected .dbx-check { background: #0061FF; border-color: #0061FF; }
.dbx-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    padding: 14px 5px 4px;
}
.dbx-date { font-size: 10px; color: #fff; font-weight: 600; }
.dbx-chevron { font-size: 14px; color: #94a3b8; width: 14px; text-align: center; flex-shrink: 0; }

/* RULES */
.rule-suggestion {
    display: inline-block;
    padding: 5px 10px;
    background: var(--blue-light);
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 11px;
    color: var(--blue);
    cursor: pointer;
    transition: all 0.15s;
}

.rule-suggestion:hover {
    background: var(--blue);
    color: var(--white);
}

.rule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--gray-50);
}

.rule-item-text {
    font-size: 13px;
    color: var(--dark);
    flex: 1;
}

.rule-item-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    margin-right: 12px;
    min-width: 24px;
}

.rule-delete {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}

.rule-delete:hover {
    color: var(--red);
    background: var(--red-light);
}

/* EXAMPLES */
.example-drop-zone {
    width: 200px;
    height: 160px;
    border: 2px dashed var(--gray-300);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
    background: var(--gray-50);
}

.example-drop-zone:hover {
    border-color: var(--blue);
    background: var(--blue-light);
}

.example-drop-zone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
