/* --- Event Detail View Component (Nested) --- */
#explorer-view-details {
  &.ios-style-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    &.view-stacked {
      opacity: 0.5;
      transform: scale(0.96) translateY(-10px);
      filter: blur(2px);
      pointer-events: none;
    }
  }

  .ios-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1rem 0 1rem;
    color: var(--accent);

    h3 {
      font-size: 1.5rem;
      font-weight: 700;
      margin: 0;
    }

    svg {
      color: var(--accent);
    }
  }

  .share-card-ios {
    background: #282b3e;
    border-radius: 18px;

    .share-link-wrapper-ios {
      display: flex;
      background: rgba(0, 0, 0, 0.25);
      border-radius: 14px;
      padding: 4px;
      align-items: center;
      gap: 4px;
      border: 0.5px solid rgba(255, 255, 255, 0.08);
      margin-top: 5px;
    }

    .share-link-text-ios {
      flex: 1;
      padding: 8px 12px;
      font-family: "SF Mono", "Roboto Mono", monospace;
      font-size: 0.75rem;
      color: rgba(255, 255, 255, 0.6);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      user-select: all;
    }

    .share-copy-pill-ios {
      display: flex;
      align-items: center;
      gap: 6px;
      background: var(--accent);
      color: #000;
      border: none;
      padding: 8px 14px;
      border-radius: 11px;
      font-weight: 700;
      font-size: 0.8rem;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      flex-shrink: 0;

      svg {
        flex-shrink: 0;
      }

      &:active {
        transform: scale(0.94);
        opacity: 0.9;
      }
    }
  }

  #details-my-order-container {
    background: #282b3e;
    padding: 1rem;
    border-radius: 18px;
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 1rem;
  }

  .ios-modal-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(25, 25, 35, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 16px !important;
    margin: 0 !important;
  }

  .ios-scroll-area {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
  }

  /* Hero Section */
  .ios-hero-section {
    padding: 1rem;
    margin-top: 0 !important;
    background: #282b3e;
    border-radius: 15px;
    margin-bottom: 1rem !important;

    .details-badges-box {
      margin-top: 0.5rem;
    }

    .ios-hero-title {
      color: var(--text-primary);
      font-size: 1.8rem;
      font-weight: 700;
      letter-spacing: -0.5px;
      line-height: 1.15;
      word-wrap: break-word;
    }

    .ios-hero-emoji-wrapper {
      width: 90px;
      height: 90px;
      margin: 0 auto 1rem auto;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
      border-radius: 50%;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
      margin: 0;
      width: 75px;
      height: 75px;
      border-radius: 20px;

      .ios-hero-emoji {
        font-size: 3.5rem;
        line-height: 1;
        text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
      }
    }

    .ios-hero-date {
      font-size: 0.95rem;
    }

    #details-event-status-badges {
      margin-top: 1.3rem;
      width: 100%;
      max-width: 100%;
      flex-wrap: wrap;
      min-height: 24px;
    }
  }

  #details-event-location-row>a {
    margin-top: 8px;
    padding: 10px 0;
    display: flex;
    width: 100%;
    position: relative;
    z-index: 10;
  }

  #details-event-location-row>a svg {
    width: 28px;
    height: 28px;
    margin-right: 6px;
  }

  /* Inset Grouped Cards */
  .ios-card-group {
    background: #282b3e;
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    overflow: hidden;

    .ios-card-header {
      font-weight: 600;
      color: #ffffff;
    }

    .ios-card-body {
      color: var(--text-primary);
      padding: 10px;
    }

    .inviteLink {
      letter-spacing: 1px;
      padding-left: 4px;
      font-size: 19px !important;
      color: #9c9fad !important;
      font-weight: 500;
    }
  }

  #details-event-admin-status {
    margin-top: 13px;
    width: 100%;
    display: flex;
    justify-content: center;

    .switch-container {
      height: 34px;
      width: 69px;
      margin-bottom: 0;
    }

    .switch-sliderround:before {
      background-color: #191923;
      border-radius: 50%;
      bottom: 2px;
      content: "";
      height: 22px;
      left: 2px;
      position: absolute;
      transition: 0.4s;
      width: 22px;
    }

    input:checked~.switch-sliderround:before {
      transform: translateX(43px);
    }
  }

  .compact-order-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 0;

    &>div {
      gap: 1em;
    }

    &:last-child {
      border-bottom: none;
    }
  }

  /* Totals Grid Styles */
  .totals-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    margin-bottom: 0;
  }

  .totals-grid-compact {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    margin-bottom: 1.5rem;
  }

  .total-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem 1rem;
    text-align: center;
    transition: var(--transition);

    &:hover {
      background: rgba(255, 255, 255, 0.06);
      border-color: rgba(255, 255, 255, 0.1);
      transform: translateY(-2px);
    }
  }

  .total-number {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
  }

  /* Poll Options & Voting */
  .poll-option-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    border-radius: 12px;
    margin-bottom: 8px;
    padding: 10px;
  }

  .poll-vote-radio {
    opacity: 0.4;
    transform: scale(0.9);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    cursor: pointer;

    &.selected {
      opacity: 1 !important;
      transform: scale(1.1) !important;
      background: transparent !important;
      border-color: transparent !important;
      box-shadow: none !important;

      &[data-value="yes"] svg {
        color: var(--accent) !important;
        filter: drop-shadow(0 0 5px rgba(225, 254, 19, 0.5));
      }

      &[data-value="maybe"] svg {
        color: #ffffff !important;
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
      }

      &[data-value="no"] svg {
        color: var(--danger) !important;
        filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5));
      }
    }

    &:hover {
      opacity: 0.8;
      transform: scale(1.05);
    }

    svg {
      pointer-events: none;
    }
  }
}

/* Responsive Overrides */
@media (max-width: 768px) {
  #explorer-view-details {
    &:not(.hidden) {
      display: flex !important;
      flex-direction: column !important;
      flex: 1 1 auto !important;
      height: 100% !important;
      width: 100% !important;
      min-height: 0;
    }

    #details-event-actions {
      gap: 0.75rem !important;
      width: 100% !important;

      .btn,
      .btn-card {
        width: 100% !important;
        margin: 0 !important;
        padding: 0.6rem 0.4rem !important;
        font-size: 0.85rem !important;
        justify-content: center !important;
      }
    }
  }
}