/* =========================
   FRONTEND LIST LAYOUT
   LEGACY SAFE VERSION (NO CSS VARIABLES)
========================= */

#flysub-results {
    padding: 20px;
    text-align: center;
    background: #f6f7f8;
}

/* =========================
   CARD WRAPPER
========================= */

.flysub-card {
    display: inline-block;
    vertical-align: top;

    width: 280px;
    margin: 10px;

    border: 1px solid #d9a441;
    background: #ffffff;

    text-align: left;
    cursor: pointer;

    box-shadow: 0 2px 6px rgba(0,0,0,0.06);

    transition: all 0.2s ease;
}

.flysub-card:hover {
    background: #fafafa;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* =========================
   IMAGE (LEGACY SAFE)
   NO object-fit USED
========================= */

.flysub-thumb-wrapper {
    width: 100%;
    height: 160px;

    overflow: hidden;
    background: #dddddd;

    position: relative;
}

.flysub-thumb-wrapper img {
    width: 100%;
    display: block;
}

/* fallback block */
.flysub-thumb-placeholder {
    width: 100%;
    height: 160px;

    background: #eaeaea;
    color: #777777;

    text-align: center;
    line-height: 160px;

    font-size: 13px;
}

/* =========================
   CARD CONTENT
========================= */

.flysub-card-content {
    padding: 12px;
}

.flysub-card-content h3 {
    font-family: Arial, sans-serif;
    margin: 0 0 8px 0;

    font-size: 18px;
    color: #2f5d3a;
}

.flysub-card-content p {
    font-size: 14px;
    line-height: 1.4;

    color: #1b4965;
}

/* =========================
   DETAIL PAGE
========================= */

#flysub-detail {
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;

    text-align: left;
    background: #ffffff;

    border: 1px solid #d9a441;

    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* BACK BUTTON */
.flysub-back-btn {
    background: #2f5d3a;
    color: #ffffff;

    border: none;
    padding: 8px 12px;

    cursor: pointer;
    margin-bottom: 20px;
}

.flysub-back-btn:hover {
    background: #244a2e;
}

/* BIG IMAGE */
.flysub-product-image {
    width: 100%;
    max-height: 400px;

    display: block;
    margin-bottom: 15px;

    border: 1px solid #e6e6e6;
}

/* DETAIL TITLE */
.flysub-detail-title {
    font-family: Arial, sans-serif;
    font-size: 28px;

    margin: 10px 0;

    color: #2f5d3a;
}

/* =========================
   META BLOCK
========================= */

.flysub-meta {
    margin-top: 15px;
    padding-top: 10px;

    border-top: 1px solid #e6e6e6;
}

.flysub-meta p {
    margin: 5px 0;
    font-size: 14px;

    color: #1a1a1a;
}

/* =========================
   STATUS TEXT
========================= */

#flysub-status {
    margin: 10px 0;
    font-size: 13px;

    color: #555555;
}

/* =========================
   RESPONSIVE (LEGACY SAFE)
========================= */

@media (max-width: 600px) {

    .flysub-card {
        width: 90%;
        margin: 10px auto;
        display: block;
    }

    #flysub-detail {
        width: 90%;
    }
}


/* =========================
   ADMIN PANEL
========================= */

#flysub-admin {
  font-family: Arial, sans-serif;
  background: #f6f7f8;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

/* =========================
   HEADER
========================= */

.flysub-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.flysub-admin-header h1 { margin: 0; color: #2f5d3a; font-size: 28px; }
.flysub-admin-header p { margin: 6px 0 0; color: #666; font-size: 14px; }
.flysub-admin-header nav { display: flex; gap: 10px; flex-wrap: wrap; }

/* =========================
   PANELS
========================= */

#flysub-browse-view,
#flysub-edit-view,
.flysub-section {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

#flysub-browse-view,
#flysub-edit-view { padding: 25px; }

.flysub-section {
  padding: 20px;
  margin-bottom: 25px;
  background: #fcfcfc;
}

.flysub-section legend {
  padding: 0 10px;
  font-size: 18px;
  font-weight: bold;
  color: #2f5d3a;
}

/* =========================
   GRID
========================= */

.flysub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

/* =========================
   FIELDS
========================= */

.flysub-field { display: flex; flex-direction: column; }

.flysub-field label {
  font-size: 13px;
  font-weight: bold;
  color: #333;
  margin-bottom: 6px;
}

.flysub-field input,
.flysub-field textarea,
.flysub-field select,
#admin-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  color: #222;
  box-sizing: border-box;
  transition: .2s;
}

.flysub-field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }

.flysub-field input:focus,
.flysub-field textarea:focus,
.flysub-field select:focus,
#admin-select:focus {
  outline: none;
  border-color: #d9a441;
  box-shadow: 0 0 0 3px rgba(217,164,65,.15);
  background: #fffefb;
}

/* =========================
   CHECKBOX
========================= */

.flysub-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  margin-top: 10px;
}

.flysub-checkbox input { width: auto; transform: scale(1.1); margin: 0; }

/* =========================
   IMAGE UPLOAD + PREVIEW
========================= */

#admin-images {
  padding: 12px;
  background: #fafafa;
  border: 2px dashed #ccc;
  cursor: pointer;
}
#admin-images:hover { background: #f2f2f2; }

#admin-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 15px;
}

#admin-image-preview div { width: 120px; text-align: center; }

#admin-image-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 6px;
}

#admin-image-preview small {
  font-size: 11px;
  color: #666;
  word-break: break-word;
}

/* =========================
   BUTTONS
========================= */

button {
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: .2s;
}

button:active { transform: translateY(1px); }

.flysub-admin-header button,
.flysub-actions button:first-child,
.flysub-login-box button {
  background: #2f5d3a;
  color: #fff;
}

.flysub-admin-header button:hover,
.flysub-actions button:first-child:hover,
.flysub-login-box button:hover {
  background: #244a2e;
}

.flysub-actions button:last-child {
  background: #ddd;
  color: #333;
}
.flysub-actions button:last-child:hover { background: #ccc; }

/* =========================
   ACTIONS
========================= */

.flysub-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* =========================
   STATUS
========================= */

#admin-status {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #ddd;
  font-size: 13px;
}

/* =========================
   LOGIN MODAL
========================= */

.flysub-login-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}

.flysub-login-box {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}

.flysub-login-box h2 {
  margin: 0 0 25px;
  color: #2f5d3a;
  text-align: center;
}

#login-error {
  margin-top: 15px;
  color: #b42318;
  font-size: 13px;
  text-align: center;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 900px) {
  .flysub-admin-header { flex-direction: column; align-items: flex-start; }
  .flysub-admin-header nav { width: 100%; }
  .flysub-admin-header button { flex: 1; }
}

@media (max-width: 700px) {
  #flysub-admin { padding: 12px; }
  #flysub-browse-view,
  #flysub-edit-view { padding: 18px; }
  .flysub-section { padding: 16px; }
  .flysub-grid { grid-template-columns: 1fr; }
  .flysub-actions { flex-direction: column; }
  .flysub-actions button { width: 100%; }
  #admin-image-preview { justify-content: center; }
}

/* =========================
   NAV BAR
========================= */

.flysub-admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #2f5d3a;
    color: #ffffff;

    padding: 10px 15px;
    margin-bottom: 20px;
}

.flysub-logo {
    font-weight: bold;
    font-size: 16px;
}

.flysub-nav-links button {
    background: #ffffff;
    color: #2f5d3a;

    border: none;
    padding: 6px 10px;

    margin-left: 6px;
    cursor: pointer;

    font-size: 13px;
}

.flysub-nav-links button:hover {
    background: #eaeaea;
}

/* =========================
   STATUS BAR
========================= */

.admin-status {
    padding: 10px;
    margin-bottom: 15px;

    font-size: 13px;
    border: 1px solid #ccc;
    background: #fff;
}

/* =========================
   VIEW WRAPPER
========================= */

.flysub-view {
    background: #ffffff;
    border: 1px solid #ddd;

    padding: 20px;
}

/* =========================
   SECTION GROUPS (NEW)
========================= */

.flysub-view h3 {
    margin-top: 25px;
    margin-bottom: 10px;

    font-size: 15px;
    color: #2f5d3a;

    border-left: 4px solid #d9a441;
    padding-left: 8px;
}

/* =========================
   INPUT FIELDS (ADMIN ONLY)
========================= */

.flysub-view input,
.flysub-view textarea,
.flysub-view select {
    width: 100%;
    padding: 8px;

    margin-bottom: 10px;

    border: 1px solid #ccc;
    background: #fff;

    font-size: 13px;
    box-sizing: border-box;
}

.flysub-view textarea {
    min-height: 80px;
    resize: vertical;
}

/* =========================
   CHECKBOX
========================= */

.flysub-view input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
}

/* =========================
   DROPZONE
========================= */

.admin-dropzone {
    border: 2px dashed #aaa;
    padding: 20px;

    text-align: center;
    background: #fafafa;

    margin-bottom: 15px;

    cursor: pointer;
    font-size: 13px;
}

.admin-dropzone:hover {
    background: #f0f0f0;
}

/* =========================
   IMAGE PREVIEW
========================= */

#admin-image-preview {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;
    margin-bottom: 15px;
}

#admin-image-preview div {
    width: 100px;
    text-align: center;
    font-size: 11px;
}

#admin-image-preview img {
    width: 100px;
    height: 100px;

    object-fit: cover;
    border: 1px solid #ccc;
}

/* =========================
   BUTTONS
========================= */

.flysub-view button {
    background: #2f5d3a;
    color: #ffffff;

    border: none;
    padding: 10px 14px;

    cursor: pointer;
    margin-right: 6px;
    margin-top: 10px;
}

.flysub-view button:hover {
    background: #244a2e;
}

/* =========================
   SELECT DROPDOWN (BROWSE)
========================= */

#admin-select {
    width: 100%;
    padding: 10px;

    font-size: 14px;
    margin-top: 10px;
}

/* =========================
   MOBILE CLEANUP
========================= */

@media (max-width: 700px) {

    .flysub-admin-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .flysub-nav-links {
        width: 100%;
    }

    .flysub-nav-links button {
        width: 48%;
        margin-bottom: 5px;
    }
}


.flysub-login-modal {

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,0.7);

    display: none;

    align-items: center;

    justify-content: center;

    z-index: 99999;
}

.flysub-login-box {

    background: white;

    padding: 30px;

    border-radius: 12px;

    width: 320px;
}


.flysub-dropzone {
    border: 2px dashed #999;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.flysub-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.flysub-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.flysub-progress {
    width: 100%;
    height: 6px;
    background: #eee;
    margin-top: 10px;
    display: none;
}

#flysub-progress-bar {
    height: 100%;
    width: 0%;
    background: #4caf50;
}

/* =========================
   FLYSUB FILTER BAR (NEW UI LAYER)
========================= */

.flysub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    padding: 12px;
    margin: 15px 0;

    background: #ffffff;
    border: 1px solid #d9a441;

    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.flysub-filters input,
.flysub-filters select {
    padding: 10px 12px;

    border: 1px solid #ccc;
    border-radius: 6px;

    font-size: 14px;
    background: #fff;

    color: #1b1b1b;

    min-width: 180px;

    transition: all 0.2s ease;
}

/* focus state aligned with gold accent */
.flysub-filters input:focus,
.flysub-filters select:focus {
    outline: none;
    border-color: #d9a441;
    box-shadow: 0 0 0 3px rgba(217,164,65,0.18);
}

/* =========================
   VIEW CONTAINER SYSTEM
========================= */

.flysub-view-container {
    padding: 10px 0;
}

/* =========================
   DESTINATION DETAIL PAGE
   (UPGRADED CLEAN UI)
========================= */

#view-destination {
    max-width: 900px;
    margin: 0 auto;
}

#dest-title {
    font-size: 28px;
    color: #2f5d3a;

    margin-bottom: 15px;

    border-left: 5px solid #d9a441;
    padding-left: 10px;
}

/* =========================
   DETAIL BODY (ACCORDION SECTIONS)
========================= */

.flysub-detail {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* each section block */
.flysub-section {
    border: 1px solid #e2e2e2;
    border-radius: 10px;

    padding: 14px;
    background: #ffffff;

    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

/* section header */
.flysub-section h4 {
    margin: 0 0 10px 0;

    font-size: 14px;
    color: #2f5d3a;

    display: flex;
    align-items: center;
    gap: 8px;
}

/* accent bar */
.flysub-section h4::before {
    content: "";
    width: 4px;
    height: 14px;

    background: #d9a441;
    display: inline-block;
}

/* =========================
   FIELD GRID (BETTER READABILITY)
========================= */

.flysub-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.flysub-field {
    padding: 6px 0;
}

.flysub-field .label {
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flysub-field .value {
    font-size: 14px;
    color: #1b1b1b;
    margin-top: 2px;
}

/* =========================
   CARD HEADER ENHANCEMENTS
========================= */

.flysub-card-header {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px;
}

.flysub-card-main h3 {
    font-size: 16px;
    margin: 0;
    color: #2f5d3a;
}

/* small metadata line */
.flysub-meta {
    font-size: 12px;
    color: #1b4965;
    margin-top: 4px;
}

/* view button */
.flysub-expand {
    margin-left: auto;

    background: #2f5d3a;
    color: #ffffff;

    border: none;
    padding: 8px 12px;

    border-radius: 6px;

    cursor: pointer;
}

.flysub-expand:hover {
    background: #244a2e;
}

/* =========================
   HERO (HOME VIEW IMPROVEMENT)
========================= */

.flysub-hero {
    text-align: center;
    padding: 40px 20px;

    background: linear-gradient(to bottom, #ffffff, #f6f7f8);
    border: 1px solid #e0e0e0;

    border-radius: 12px;
}

.flysub-hero h2 {
    font-size: 26px;
    color: #2f5d3a;
}

.flysub-hero p {
    color: #444;
    max-width: 600px;
    margin: 10px auto 20px;
}

/* =========================
   BACK BUTTON BAR
========================= */

.flysub-backbar {
    margin-bottom: 15px;
}

.flysub-backbar button {
    background: #ffffff;
    border: 1px solid #d9a441;

    padding: 8px 12px;
    border-radius: 6px;

    cursor: pointer;
    color: #2f5d3a;
}

.flysub-backbar button:hover {
    background: #f7f7f7;
}

/* =========================
   RESPONSIVE IMPROVEMENTS
========================= */

@media (max-width: 700px) {

    .flysub-filters {
        flex-direction: column;
    }

    .flysub-filters input,
    .flysub-filters select {
        width: 100%;
    }

    .flysub-grid-2 {
        grid-template-columns: 1fr;
    }

    .flysub-card {
        width: 95%;
    }
}