/* ==========================================================================
   Yacht Booking - Core Admin & Global Styles
   ========================================================================== */

:root {
    --yacht-primary: #18273b;
    --yacht-primary-dark: #101c2a;
    --yacht-primary-light: rgba(24, 39, 59, 0.08);
    --yacht-accent: #0ea5e9;
    --yacht-accent-light: rgba(14, 165, 233, 0.1);
    --yacht-gold: #D4AF37;
    --yacht-font-family: inherit;
    --yacht-font: var(--yacht-font-family);

    /* Semantic Palette */
    --yacht-white: #ffffff;
    --yacht-black: #000000;
    --yacht-success: #22c55e;
    --yacht-success-light: #dcfce7;
    --yacht-success-dark: #166534;
    --yacht-danger: #ef4444;
    --yacht-danger-light: #fee2e2;
    --yacht-danger-dark: #991b1b;
    --yacht-warning: #f59e0b;
    --yacht-warning-light: #fef3c7;
    --yacht-warning-dark: #854d0e;
    --yacht-info: #0ea5e9;
    --yacht-info-light: #e0f2fe;
    --yacht-info-dark: #1e40af;
    --yacht-star: #ffb100;
    --yacht-star-alpha: rgba(255, 177, 0, 0.3);

    /* Decorative Palette for Dashboard Gradients */
    --yacht-violet: #7c3aed;
    --yacht-violet-light: #a78bfa;
    --yacht-amber: #d97706;
    --yacht-amber-light: #fbbf24;
    --yacht-teal: #0d9488;
    --yacht-teal-light: #2dd4bf;
    --yacht-rose: #e11d48;
    --yacht-rose-light: #fb7185;
    --yacht-blue: #2563eb;
    --yacht-blue-light: #60a5fa;

    /* Typography Scale (Major Third - 1.25 ratio) */
    --yacht-font-xs: 0.75rem;
    /* 12px */
    --yacht-font-sm: 0.875rem;
    /* 14px */
    --yacht-font-base: 1rem;
    /* 16px */
    --yacht-font-lg: 1.125rem;
    /* 18px */
    --yacht-font-xl: 1.25rem;
    /* 20px */
    --yacht-font-2xl: 1.5rem;
    /* 24px */
    --yacht-font-3xl: 1.875rem;
    /* 30px */
    --yacht-font-4xl: 2.25rem;
    /* 36px */
    --yacht-font-5xl: 3rem;
    /* 48px */
    --yacht-font-tiny: 0.6875rem;
    /* 11px */

    /* Font Weights */
    --yacht-weight-normal: 400;
    --yacht-weight-medium: 500;
    --yacht-weight-semibold: 600;
    --yacht-weight-bold: 700;

    /* Line Heights */
    --yacht-leading-tight: 1.2;
    --yacht-leading-normal: 1.5;
    --yacht-leading-relaxed: 1.75;

    /* Neutral scale */
    --yacht-bg: #f4f6f9;
    --yacht-bg-dark: #0d1217;
    --yacht-surface: #ffffff;
    --yacht-surface-soft: #f8fafc;
    --yacht-border: #e8ecf1;
    --yacht-border-light: #f1f5f9;
    --yacht-border-strong: #cbd5e1;
    --yacht-text: #0f172a;
    --yacht-text-muted: #64748b;
    --yacht-text-light: #94a3b8;

    /* Spacing & Radius */
    --yacht-radius-sm: 8px;
    --yacht-radius: 12px;
    --yacht-radius-lg: 16px;
    --yacht-radius-xl: 20px;
    --yacht-radius-2xl: 24px;
    --yacht-radius-full: 9999px;

    /* Shadows */
    --yacht-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --yacht-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --yacht-shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --yacht-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --yacht-transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);

    /* Layout Constants */
    --yacht-sidebar-w: 260px;
    --yacht-topbar-h: 72px;

    /* Form Constants */
    --yacht-input-h: 46px;
    --yacht-input-h-sm: 38px;
}

/* ── Typography Tokens (Global) ────────────────────────────────────────── */
.yacht-h1 {
    font-size: var(--yacht-font-3xl);
    font-weight: var(--yacht-weight-bold);
    color: var(--yacht-text);
    line-height: var(--yacht-leading-tight);
}

.yacht-h2 {
    font-size: var(--yacht-font-xl);
    font-weight: var(--yacht-weight-semibold);
    color: var(--yacht-text);
    line-height: var(--yacht-leading-tight);
}

.yacht-h3 {
    font-size: var(--yacht-font-lg);
    font-weight: var(--yacht-weight-semibold);
    color: var(--yacht-text);
    line-height: var(--yacht-leading-normal);
}

.yacht-h4 {
    font-size: var(--yacht-font-base);
    font-weight: var(--yacht-weight-semibold);
    color: var(--yacht-text);
}

.yacht-p {
    font-size: var(--yacht-font-sm);
    font-weight: var(--yacht-weight-normal);
    color: var(--yacht-text-muted);
    line-height: var(--yacht-leading-relaxed);
}

/* ── Global UI Components (Shared across Admin & Frontend) ────────────── */

.yacht-label {
    font-size: var(--yacht-font-sm);
    font-weight: var(--yacht-weight-semibold);
    color: var(--yacht-text);
    display: block;
    margin-bottom: 8px;
    font-family: var(--yacht-font-family, inherit);
}

.yacht-meta {
    font-size: var(--yacht-font-xs);
    font-weight: var(--yacht-weight-normal);
    color: var(--yacht-text-muted);
    line-height: 1.4;
}

.yacht-muted-text {
    font-size: var(--yacht-font-sm);
    color: var(--yacht-text-muted);
    line-height: var(--yacht-leading-normal);
}

.yacht-card__side-title {
    font-size: var(--yacht-font-tiny);
    font-weight: var(--yacht-weight-bold);
    color: var(--yacht-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.yacht-form-group--inline {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: flex-end;
}

/* Higher specificity to override WP defaults without !important */
.yacht-app .yacht-input {
    display: block;
    width: 100%;
    height: var(--yacht-input-h);
    padding: 0 16px;
    box-sizing: border-box;
    border: 1px solid var(--yacht-border);
    border-radius: var(--yacht-radius);
    font-size: var(--yacht-font-sm);
    font-family: inherit;
    color: var(--yacht-text);
    background: var(--yacht-surface-soft);
    outline: none;
    transition: var(--yacht-transition);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.01);
    -webkit-appearance: none;
    appearance: none;
    line-height: normal;
}

/* Specific styling for select/dropdown */
.yacht-app select.yacht-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
    line-height: normal;
}

.yacht-app textarea.yacht-input {
    resize: none;
    min-height: 120px;
    height: auto;
    padding: 12px 16px;
    line-height: var(--yacht-leading-relaxed);
}

.yacht-app .yacht-input--sm {
    height: var(--yacht-input-h-sm);
    padding: 0 12px;
    font-size: var(--yacht-font-xs);
    border-radius: var(--yacht-radius-sm);
    line-height: var(--yacht-input-h-sm);
}

.yacht-input:focus {
    border-color: var(--yacht-primary);
    background: var(--yacht-surface);
    box-shadow: 0 0 0 4px var(--yacht-primary-light);
}

.yacht-app .yacht-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px;
    border-radius: var(--yacht-radius);
    font-weight: var(--yacht-weight-semibold);
    font-size: var(--yacht-font-sm);
    transition: var(--yacht-transition);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    line-height: normal;
    height: var(--yacht-input-h);
    box-sizing: border-box;
    white-space: nowrap;
    outline: none;
    user-select: none;
    width: fit-content !important;
    max-width: 100%;
    flex-shrink: 0;
}

.yacht-btn--sm {
    height: var(--yacht-input-h-sm);
    padding: 0 16px;
    font-size: var(--yacht-font-xs);
}

.yacht-btn .material-symbols-outlined {
    font-size: 20px;
    display: block;
    line-height: 1;
}

.yacht-btn-primary {
    background: var(--yacht-primary);
    color: var(--yacht-white) !important;
}

.yacht-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.yacht-btn-secondary {
    background: var(--yacht-surface);
    color: var(--yacht-text);
    border-color: var(--yacht-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.yacht-btn-secondary:hover {
    background: var(--yacht-surface-soft);
    border-color: var(--yacht-border-strong);
    transform: translateY(-1px);
    box-shadow: var(--yacht-shadow-sm);
}

/* Premium Border Utility */
.yacht-card-dotted {
    background: var(--yacht-surface);
    border: 2px dotted var(--yacht-border-strong);
    border-radius: var(--yacht-radius-xl);
    padding: 32px;
    transition: var(--yacht-transition);
}

.yacht-card-dotted:hover {
    border-color: var(--yacht-primary-light);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.03);
}

/* ── Meta Boxes (Admin Side) ───────────────────────────────────────────── */
.yacht-meta-container .meta-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.yacht-meta-container .meta-field {
    flex: 1;
}

.yacht-meta-container label,
.yacht-repeater-section label,
.yacht-location-container label,
.yacht-media-container label,
.yacht-team-container label {
    display: block;
    font-weight: var(--yacht-weight-semibold);
    margin-bottom: 5px;
    color: var(--yacht-primary);
}

.yacht-meta-container input,
.yacht-meta-container select,
.yacht-repeater-section textarea,
.yacht-repeater-section input,
.yacht-location-container input,
.yacht-media-container input,
.yacht-team-container input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--yacht-border);
    border-radius: 4px;
    font-family: inherit;
    color: var(--yacht-text);
}

/* Legacy size-input replaced by .yacht-input--sm and .yacht-form-grid */

.yacht-repeater-section {
    padding: 15px 0;
}

.repeater-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.repeater-table th,
.repeater-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--yacht-border-light);
}

.icon-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-input-wrap .material-symbols-outlined {
    font-size: 24px;
    color: var(--yacht-primary);
}

.gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.gallery-item {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid var(--yacht-border);
    border-radius: 4px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-gallery-item {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--yacht-danger);
    color: var(--yacht-white);
    cursor: pointer;
    border-radius: var(--yacht-radius-full);
    padding: 2px;
}

.flex-input {
    display: flex;
    gap: 10px;
}

hr {
    border: 0;
    border-top: 1px solid var(--yacht-border-light);
    margin: 20px 0;
}