/* ============================================================
   JOD WEDDINGS — UI COMPONENTS
   ============================================================ */

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.75rem 2rem;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-height: 48px;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.08);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::after { opacity: 1; }

/* Primary Gold Button */
.btn-primary {
    background: var(--accent);
    color: var(--obsidian);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    color: var(--obsidian);
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Outline Button */
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

/* Ghost Button (light text on dark) */
.btn-ghost {
    background: rgba(255,255,255,0.1);
    color: var(--ivory);
    border-color: rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.5);
    color: var(--ivory);
}

/* Gold Outline */
.btn-gold-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-gold-outline:hover {
    background: var(--accent);
    color: var(--obsidian);
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

/* Small Button */
.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: var(--text-xs);
    min-height: 36px;
}

/* Large Button */
.btn-lg {
    padding: 1rem 2.5rem;
    font-size: var(--text-base);
    min-height: 56px;
}

/* Icon Button */
.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--shadow-gold);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ─── BADGE ───────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.25rem 0.75rem;
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: var(--radius-full);
    border: 1px solid;
}

.badge-gold {
    background: var(--gold-muted);
    color: var(--accent);
    border-color: var(--gold-border);
}

.badge-success {
    background: rgba(52, 168, 83, 0.1);
    color: #34A853;
    border-color: rgba(52, 168, 83, 0.3);
}

.badge-pending {
    background: rgba(201, 169, 110, 0.1);
    color: var(--accent);
    border-color: var(--gold-border);
}

/* ─── CARDS ───────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-body {
    padding: var(--space-8);
}

.card-body--sm {
    padding: var(--space-6);
}

.card-image {
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.04);
}

/* ─── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--space-4);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    backdrop-filter: blur(4px);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.98);
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: var(--space-8) var(--space-8) var(--space-6);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.modal-body {
    padding: var(--space-8);
}

.modal-footer {
    padding: var(--space-6) var(--space-8) var(--space-8);
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    padding: var(--space-1);
    transition: color var(--transition-fast);
    flex-shrink: 0;
}

.modal-close:hover { color: var(--text-primary); }

/* ─── FORMS ───────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label {
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--gold-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C9A96E' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Radio/Checkbox Group */
.radio-group,
.check-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.radio-option,
.check-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    background: var(--input-bg);
}

.radio-option:hover,
.check-option:hover {
    border-color: var(--accent);
    background: var(--gold-muted);
}

.radio-option input,
.check-option input {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.radio-option.selected,
.check-option.selected {
    border-color: var(--accent);
    background: var(--gold-muted);
}

/* Counter Input */
.counter-input {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    background: var(--input-bg);
    width: fit-content;
}

.counter-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1;
}

.counter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.counter-value {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    font-weight: 500;
    min-width: 2rem;
    text-align: center;
    color: var(--text-primary);
}

/* Form Error */
.form-error {
    font-size: var(--text-sm);
    color: #E53E3E;
}

.form-success {
    font-size: var(--text-sm);
    color: #38A169;
}

/* ─── NOTIFICATION TOAST ──────────────────────────────────── */
.toast {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-6);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    z-index: var(--z-max);
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-base);
    max-width: 360px;
}

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

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-message {
    font-size: var(--text-sm);
    color: var(--text-primary);
    line-height: 1.4;
}

/* ─── ACCORDION ───────────────────────────────────────────── */
.accordion-item {
    border-bottom: 1px solid var(--border);
}

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6) 0;
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    font-weight: 400;
    color: var(--text-primary);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: color var(--transition-fast);
}

.accordion-trigger:hover { color: var(--accent); }

.accordion-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-base);
    color: var(--accent);
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
    background: var(--accent);
    color: var(--obsidian);
    border-color: var(--accent);
    rotate: 45deg;
}

.accordion-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height var(--transition-slow);
}

.accordion-content.open {
    max-height: 500px;
}

.accordion-body {
    padding-bottom: var(--space-6);
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: var(--text-md);
}

/* ─── TABS ────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: var(--space-1);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-8);
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ─── LOADING SPINNER ─────────────────────────────────────── */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 3px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── LOADER OVERLAY ──────────────────────────────────────── */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-16);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ─── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-16) var(--space-8);
    text-align: center;
}

.empty-state-icon {
    font-size: 3rem;
    opacity: 0.4;
    margin-bottom: var(--space-2);
}

.empty-state h3 {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    font-weight: 300;
    color: var(--text-primary);
}

.empty-state p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    max-width: 36ch;
    margin-inline: auto;
}

/* ─── STEP INDICATOR ──────────────────────────────────────── */
.step-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-8);
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--border);
    transition: all var(--transition-base);
}

.step-dot.active {
    background: var(--accent);
    width: 24px;
}

.step-dot.done {
    background: var(--accent);
}

/* ─── COLOR SWATCH ────────────────────────────────────────── */
.color-swatch {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.swatch-circle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.swatch:hover .swatch-circle { transform: scale(1.1); }

.swatch-name {
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
}

/* ─── PHOTO UPLOAD ────────────────────────────────────────── */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-12) var(--space-8);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--bg-card);
}

.upload-zone:hover,
.upload-zone.dragging {
    border-color: var(--accent);
    background: var(--gold-muted);
}

.upload-zone-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

/* ─── SEARCH INPUT ────────────────────────────────────────── */
.search-box {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

.search-box .form-input {
    flex: 1;
}

/* ─── PROGRESS BAR ────────────────────────────────────────── */
.progress {
    height: 2px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}
