/* One-Time Offer — Admin BO Styles */

/* ── Page header bar ─────────────────────────────────── */
.oto-admin-header {
    background: linear-gradient(135deg, #c0392b 0%, #922b21 100%);
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    color: #fff;
}

.oto-admin-header-icon {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.oto-admin-header h2 {
    margin: 0 0 4px 0;
    font-size: 1.4em;
    font-weight: 700;
    color: #fff;
}

.oto-admin-header p {
    margin: 0;
    opacity: 0.85;
    font-size: 0.9em;
}

/* ── Section cards ───────────────────────────────────── */
.oto-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.05);
    margin-bottom: 24px;
    overflow: hidden;
}

.oto-card-header {
    padding: 16px 22px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafafa;
}

.oto-card-header h3 {
    margin: 0;
    font-size: 1em;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oto-card-header h3 .oto-icon {
    color: #e74c3c;
    font-size: 1.1em;
}

.oto-card-body {
    padding: 22px;
}

/* ── Settings form ───────────────────────────────────── */
.oto-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.oto-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.oto-form-group.full-width {
    grid-column: 1 / -1;
}

.oto-form-group label {
    font-size: 0.82em;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.oto-form-group .oto-desc {
    font-size: 0.78em;
    color: #999;
    margin-top: 2px;
}

.oto-form-group input[type="text"],
.oto-form-group input[type="number"],
.oto-form-group select {
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9em;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.oto-form-group input:focus,
.oto-form-group select:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231,76,60,0.12);
}

/* Toggle switch */
.oto-toggle-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.oto-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.oto-toggle input { opacity: 0; width: 0; height: 0; }

.oto-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.2s;
}

.oto-toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.oto-toggle input:checked + .oto-toggle-slider { background: #e74c3c; }
.oto-toggle input:checked + .oto-toggle-slider:before { transform: translateX(20px); }

.oto-toggle-label {
    font-size: 0.88em;
    color: #555;
    font-weight: 500;
}

/* ── Buttons ─────────────────────────────────────────── */
.oto-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    white-space: nowrap;
}

.oto-btn:active { transform: translateY(1px); }

.oto-btn-primary {
    background: #e74c3c;
    color: #fff;
    box-shadow: 0 2px 6px rgba(231,76,60,0.3);
}
.oto-btn-primary:hover { background: #c0392b; color: #fff; text-decoration: none; }

.oto-btn-secondary {
    background: #f0f0f0;
    color: #555;
}
.oto-btn-secondary:hover { background: #e0e0e0; color: #333; text-decoration: none; }

.oto-btn-success {
    background: #27ae60;
    color: #fff;
    box-shadow: 0 2px 6px rgba(39,174,96,0.3);
}
.oto-btn-success:hover { background: #219a52; color: #fff; text-decoration: none; }

.oto-btn-danger {
    background: #fff;
    color: #e74c3c;
    border: 1.5px solid #e74c3c;
}
.oto-btn-danger:hover { background: #e74c3c; color: #fff; text-decoration: none; }

.oto-btn-sm {
    padding: 5px 11px;
    font-size: 0.8em;
}

.oto-card-footer {
    padding: 14px 22px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ── Tier list ───────────────────────────────────────── */
.oto-tiers-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.oto-tier-row {
    display: flex;
    align-items: center;
    padding: 14px 22px;
    border-bottom: 1px solid #f5f5f5;
    gap: 16px;
    transition: background 0.15s;
}

.oto-tier-row:last-child { border-bottom: none; }
.oto-tier-row:hover { background: #fafafa; }

.oto-tier-color {
    width: 8px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.oto-tier-info {
    flex: 1;
}

.oto-tier-name {
    font-weight: 700;
    font-size: 0.95em;
    color: #2c3e50;
    margin: 0 0 3px 0;
}

.oto-tier-range {
    font-size: 0.8em;
    color: #888;
}

.oto-tier-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.oto-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

.oto-badge-active { background: #e8f5e9; color: #2e7d32; }
.oto-badge-inactive { background: #fce4e4; color: #c62828; }
.oto-badge-products { background: #e3f2fd; color: #1565c0; }

.oto-tier-actions { display: flex; gap: 8px; }

/* ── Add product form ────────────────────────────────── */
.oto-add-product-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.oto-product-search-wrap {
    position: relative;
}

.oto-product-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
}

.oto-autocomplete-item {
    padding: 9px 14px;
    cursor: pointer;
    font-size: 0.85em;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.oto-autocomplete-item:hover,
.oto-autocomplete-item.active {
    background: #fff5f5;
    color: #e74c3c;
}

.oto-autocomplete-item:last-child { border-bottom: none; }

.oto-autocomplete-item .oto-item-id {
    font-size: 0.78em;
    color: #aaa;
    flex-shrink: 0;
}

/* ── Products table ──────────────────────────────────── */
.oto-products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88em;
}

.oto-products-table th {
    text-align: left;
    padding: 10px 14px;
    background: #f8f8f8;
    color: #888;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1.5px solid #eee;
}

.oto-products-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}

.oto-products-table tr:last-child td { border-bottom: none; }
.oto-products-table tr:hover td { background: #fafafa; }

.oto-product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: contain;
    border: 1px solid #eee;
    background: #fafafa;
}

.oto-price-oto {
    font-weight: 700;
    color: #e74c3c;
}

.oto-price-regular {
    color: #aaa;
    text-decoration: line-through;
    font-size: 0.9em;
}

/* ── Empty state ─────────────────────────────────────── */
.oto-empty {
    text-align: center;
    padding: 40px 20px;
    color: #bbb;
}

.oto-empty .oto-empty-icon {
    font-size: 3em;
    margin-bottom: 12px;
    opacity: 0.4;
}

.oto-empty p { margin: 0; font-size: 0.9em; }

/* ── Alert ───────────────────────────────────────────── */
.oto-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.88em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oto-alert-success { background: #e8f5e9; color: #2e7d32; border-left: 3px solid #4caf50; }
.oto-alert-error   { background: #fce4e4; color: #c62828; border-left: 3px solid #e53935; }
.oto-alert-info    { background: #e3f2fd; color: #1565c0; border-left: 3px solid #1e88e5; }

/* ── Breadcrumb nav inside config ────────────────────── */
.oto-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82em;
    color: #888;
    margin-bottom: 18px;
    text-decoration: none;
    transition: color 0.2s;
}
.oto-back-link:hover { color: #e74c3c; text-decoration: none; }

/* Tier color palette */
.oto-color-0 { background: #e74c3c; }
.oto-color-1 { background: #e67e22; }
.oto-color-2 { background: #27ae60; }
.oto-color-3 { background: #2980b9; }
.oto-color-4 { background: #8e44ad; }

/* ── Color picker / previously inline styles ─────────── */
.oto-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.oto-color-input {
    width: 48px;
    height: 38px;
    padding: 2px 4px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
}

.oto-color-preview {
    font-size: 0.85em;
    color: #555;
    font-family: monospace;
}

.oto-form-group-submit {
    justify-content: flex-end;
}

.oto-muted {
    color: #aaa;
}

.oto-combination-wrap {
    margin-bottom: 12px;
    padding: 12px 14px;
    background: #fef5e7;
    border: 1px solid #f6ad55;
    border-radius: 6px;
}

.oto-combination-wrap label {
    display: block;
    font-weight: 600;
    color: #b7791f;
    margin-bottom: 6px;
    font-size: 0.9em;
}

.oto-combination-wrap .oto-desc {
    display: block;
    margin-top: 4px;
    font-size: 0.82em;
    color: #7a5a1c;
}

.oto-combination-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d69e2e;
    border-radius: 6px;
    background: #fff;
    font-size: 0.95em;
}

.oto-combo-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    background: #e8f4fc;
    color: #2b6cb0;
    border: 1px solid #bee3f8;
    border-radius: 4px;
    font-size: 0.75em;
    vertical-align: middle;
}

.oto-combo-label {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 6px;
    background: #fef5e7;
    color: #b7791f;
    border: 1px solid #f6ad55;
    border-radius: 4px;
    font-size: 0.8em;
}

