/* =========================
   LAPTOP TOPICS STYLES
   ========================= */
.laptop-container {
  .topics {
    .page-header-container {
      display: flex;
      align-items: flex-start;
      gap: 1.2em;
      margin-bottom: 0.5em;
      position: relative;
    }

    .builder-logo-container {
      flex-shrink: 0;
      width: 150px;
      height: 150px;
    }

    .builder-logo-container img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }

    .header-content {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      position: relative;
    }

    .header-controls {
      display: flex;
      gap: 1em;
      align-items: flex-start;

      .header-controls-button {
        font-size: 0.8em;
        width: 100%;
        box-sizing: border-box;
      }
    }

    .page-header-title {
      margin-bottom: 0.2em;
      font-size: 1.8em;
      font-weight: 600;
      color: #333;
      display: flex;
      align-items: baseline;
      gap: 0.5em;

      .seminar-number {
        font-size: 0.9em;
        color: #666;
      }
    }

    .header-settings {
      border: 1px solid #e9ecef;
      border-radius: 8px;
      padding: 0.25rem 0.5rem;
      display: flex;
      flex-direction: column;
      gap: 0.5em;

      .sats-btc-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 0.85em;
      }

      .switch {
        position: relative;
        display: inline-block;
        width: 48px;
        height: 28px;
      }

      .switch input {
        opacity: 0;
        width: 0;
        height: 0;
      }

      .slider {
        position: absolute;
        cursor: pointer;
        top: 0; left: 0; right: 0; bottom: 0;
        background-color: var(--primary-orange);
        border-radius: 34px;
        transition: .4s;
      }

      .slider:before {
        position: absolute;
        content: "";
        height: 20px; width: 20px;
        left: 5px;
        top: 0px;
        background-color: white;
        border-radius: 50%;
        transition: .3s;
      }

      .switch input:checked + .slider {
        background-color: #222;
      }

      .switch input:checked + .slider:before {
        transform: translateX(20px);
      }

      .toggle-label {
        font-weight: 600;
        color: #888;
        user-select: none;
      }

      .toggle-label-units {
        color: var(--primary-orange);
        margin-right: 0.5em;
      }

      .toggle-label-sats {
        color: var(--primary-orange);
      }

      .toggle-label-btc {
        margin-right: 0.5em;
        color: #222;
      }

      /* Lightning Effects Toggle */
      .lightning-effects-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 0.85em;
        width: 100%;
        padding-right: 1.75em;
      }

      .toggle-label-lightning {
        color: var(--primary-orange);
        font-weight: 600;
        user-select: none;
      }

      /* QR Code Toggle */
      .qr-code-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 0.85em;
        width: 100%;
        padding-right: 1.75em;
      }

      .toggle-label-qr {
        color: var(--primary-orange);
        font-weight: 600;
        user-select: none;
      }
    }

    .header-actions {
      display: flex;
      flex-direction: column;
      gap: 0.5em;
      border: 1px solid #e9ecef;
      border-radius: 8px;
      padding: 0.25rem 0.5rem;

      form {
        margin: 0;
      }

      .button {
        min-width: 120px;
        text-align: center;
        background-color: white;
        border: 1px solid #f89406;
        color: #f89406;
        border-radius: 8px;
        padding: 6px 12px;
      }

      .button.button-danger {
        border-color: #dc3545;
        color: #dc3545;
        background-color: white;
        border-radius: 8px !important;
        padding: 6px 12px;
      }

      .button:hover {
        background-color: #f89406;
        color: white;
      }

      .button.button-danger:hover {
        background-color: #dc3545;
        color: white;
      }

      .submit-topic-button {
        color: var(--primary-blue) !important;
        border: 1.5px solid var(--primary-blue) !important;
        border-radius: 8px;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        text-decoration: none;
        display: inline-block;
        transition: all 0.2s ease;
        margin-left: 0.5rem;
      }

      .submit-topic-button:hover {
        text-decoration: underline;
        background-color: white;
      }
    }

    .header-payout {
      display: flex;
      flex-direction: column;
      gap: 0.5em;
      border: 1px solid #e9ecef;
      border-radius: 8px;
      padding: 0.25rem 0.5rem;
    }

    .qr-code-container {
      position: absolute;
      top: 0;
      right: -320px;
      background: white;
      border: 1px solid #e9ecef;
      border-radius: 8px;
      padding: 0.25rem 0.25rem 0 0.25rem;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      z-index: 10;
    }

    /* Sections */
    .section-title {
      margin-top: 0.9em;
      margin-bottom: 0.25em;
    }

    /* Topics */
    .topic-list-item {
      padding: 6px 15px 7px 15px;
      margin-bottom: 10px;
      background-color: #ffffff;
    }

    /* Reduce spacing for topics without actions */
    .topic-list-item:not(:has(.vote-and-sats-info > *)) {
      padding: 3px 15px;
    }

    .topic-list-item.flash-border {
      animation: flash-border 0.7s cubic-bezier(.23,1.5,.32,1) both;
      border-radius: 8px;
    }

    .topic-header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      margin-bottom: 0;
    }

    .topic-name {
      a {
        font-size: 1.3rem;
        font-weight: 500 !important;
        margin-bottom: 0.3rem;
        color: var(--primary-orange);
      }
    }

    /* Make non-interactive topics black */
    .topic-list-item:not(:has(.vote-and-sats-info > *)) .topic-name a {
      color: #333;
    }

    /* Remove bottom margin from topic name when no actions are present */
    .topic-list-item:not(:has(.vote-and-sats-info > *)) .topic-name {
      margin-bottom: 0;
    }

    .topic-link {
      font-size: 0.85em;
      color: #666;
      margin-left: 1em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 400px;
      display: inline-block;
      vertical-align: middle;
    }

    .topic-link a {
      font-size: 0.8em;
      color: var(--secondary-orange) !important;
    }

    /* Voting */
    .vote-and-sats-info {
      font-size: 0.95em;
      display: flex;
      align-items: center;
      gap: 0.5em;
      font-weight: 400;
      margin-bottom: 0;
      /* Ensure consistent height even when empty */
      /* min-height: 2em;  */
    }

    .vote-buttons {
      display: flex;
      gap: 0.3em;
      margin-top: 0;
      vertical-align: middle;
      margin-left: 0.1em;
    }

    .vote-button {
      background: var(--primary-orange);
      color: #fff;
      border: none;
      border-radius: 6px;
      padding: 0.2em 1.5em;
      font-size: 0.9em;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.2em;
      transition: background 0.2s, color 0.2s;
      line-height: 1.2;
    }

    .vote-button:disabled {
      background: #e5e7eb;
      color: #b1b5bb;
      cursor: not-allowed;
    }

    .vote-button:hover:not(:disabled) {
      background: #ffb347;
      color: #222;
    }

    .vote-arrow {
      font-size: 1em;
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      position: relative;
      top: 3px;
    }

    .vote-count-label {
      font-size: 1.2rem;
    }

    .vote-count {
      font-weight: 600;
      font-size: 1.3em;
    }

    /* Sats / Payment */
    .sats-info {
      display: flex;
      align-items: center;
      gap: 0.25rem;
    }

    .sats-received {
      margin-bottom: 0;
      font-weight: 600;
    }

    /* Subtopics */
    .subtopics-container {
      margin-top: 0.5em;
      margin-left: 1em;
      padding-top: 0.5em;
      border-top: 1px solid #e9ecef;
    }

    .subtopics-label {
      font-size: 0.85em;
      font-weight: 600;
      color: #666;
      margin-bottom: 0.25em;
    }

    .subtopics-list {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5em;
    }

    .subtopic-item {
      padding: 0.25em 0.5em;
      border-radius: 4px;
      font-size: 0.9em;
      font-weight: 500;

      a {
        color: rgb(34, 34, 34);
        text-decoration: none;
        font-weight: 500;
      }

      a:hover {
        text-decoration: underline;
      }
    }

  }

  .projector {
    .projector-instruction {
      margin-bottom: 0.5em;
      padding: 0.75rem 2rem;
    }
  }

  /* Delete Modal Styles  */
  /* Note, these are not inside the .topics class. */
  #deleteSectionsModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
  }

  .delete-modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
  }

  .delete-modal-header {
    color: #e74c3c;
    margin-top: 0;
  }

  .delete-modal-warning {
    color: #e74c3c;
    font-weight: bold;
  }

  .delete-modal-actions {
    margin-top: 20px;
    text-align: right;
  }

  .delete-modal-cancel {
    margin-right: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
  }
}

/* Alert Styles for Error Messages */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-heading {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.alert-list {
  margin: 0;
  padding-left: 1.5rem;
}

.alert-list li {
  margin-bottom: 0.25rem;
}

/* Field hint styles */
.field-hint {
  font-size: 0.85em;
  color: #666;
  margin-top: 0.25rem;
  font-style: italic;
}

/* Topic Form Styles */
.topic-form .field {
  margin-bottom: 1.5rem;
}

.topic-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: 500;
}

.topic-form input[type="text"],
.topic-form textarea,
.topic-form select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  background-color: white;
}

.topic-form input[type="text"]:focus,
.topic-form textarea:focus,
.topic-form select:focus {
  border-color: var(--primary-orange);
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.topic-form .actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.topic-form .button {
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.topic-form .button:hover {
  transform: translateY(-1px);
}

/* Error Styles */
.topic-form #error_explanation {
  margin-bottom: 2rem;
  padding: 1rem;
  background: #fff5f5;
  border: 1px solid #feb2b2;
  border-radius: 4px;
}

.topic-form #error_explanation h2 {
  margin-bottom: 1rem;
  color: #c53030;
  font-size: 1rem;
  font-weight: 500;
}

.topic-form #error_explanation ul {
  margin-left: 1rem;
  color: #c53030;
  list-style-type: disc;
}

.topic-form input[type="text"].field_with_errors {
  border-color: #c53030;
}

/* Payout Page Styles */
.payout-page {
  .page-header {
    margin-bottom: 2rem;

    .page-header-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 1rem;
    }

    .page-header-container {
      flex: 1;
    }

    .page-title {
      margin: 0;
      color: #333;
      font-size: 2rem;
      font-weight: 600;
      display: flex;
      align-items: baseline;
      gap: 0.5rem;

      .seminar-info {
        font-size: 0.9em;
        color: #666;
      }
    }

    .header-actions {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      border: 1px solid #e9ecef;
      border-radius: 8px;
      padding: 0.25rem 0.5rem;

      .sats-btc-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 0.85em;
      }

      .switch {
        position: relative;
        display: inline-block;
        width: 48px;
        height: 28px;
      }

      .switch input {
        opacity: 0;
        width: 0;
        height: 0;
      }

      .slider {
        position: absolute;
        cursor: pointer;
        top: 0; left: 0; right: 0; bottom: 0;
        background-color: var(--primary-orange);
        border-radius: 34px;
        transition: .4s;
      }

      .slider:before {
        position: absolute;
        content: "";
        height: 20px; width: 20px;
        left: 5px;
        top: 0px;
        background-color: white;
        border-radius: 50%;
        transition: .3s;
      }

      .switch input:checked + .slider {
        background-color: #222;
      }

      .switch input:checked + .slider:before {
        transform: translateX(20px);
      }

      .toggle-label {
        font-weight: 600;
        color: #888;
        user-select: none;
      }

      .toggle-label-sats {
        color: var(--primary-orange);
      }

      .toggle-label-btc {
        margin-right: 0.5em;
        color: #222;
      }

      .button {
        min-width: 120px;
        text-align: center;
        background-color: white;
        border: 1px solid #f89406;
        color: #f89406;
        border-radius: 8px;
        padding: 6px 12px;
        text-decoration: none;
        display: inline-block;
        transition: all 0.2s ease;
      }

      .button:hover {
        background-color: #f89406;
        color: white;
      }

      .button-secondary {
        border-color: #6c757d;
        color: #6c757d;
      }

      .button-secondary:hover {
        background-color: #6c757d;
        color: white;
      }
    }
  }

  .payout-sections {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .payout-section {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fff;

    .section-title {
      margin: 0 0 1rem 0;
      color: #333;
      font-size: 1.2rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 0.5rem;

      i {
        color: var(--primary-orange);
      }
    }

    .payout-amount {
      .amount-display {
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
        margin-bottom: 0.5rem;

        .amount-unit {
          font-size: 2rem;
          color: #666;
          font-weight: 500;
        }

        .amount-value {
          font-size: 2rem;
          font-weight: 700;
          color: var(--primary-orange);
        }
      }

      .amount-description {
        color: #666;
        font-size: 0.9em;
        margin-bottom: 0.5rem;
      }

      .manual-process-note {
        color: #856404;
        background-color: #fff3cd;
        border: 1px solid #ffeaa7;
        border-radius: 4px;
        padding: 0.75rem;
        font-size: 0.9em;
        display: flex;
        align-items: center;
        gap: 0.5rem;

        i {
          color: #856404;
        }
      }
    }
  }

  .payout-status-message.success {
    margin-bottom: 0.5rem;
    color: #155724;
  }

  .payout-status-message.error {
    margin-bottom: 0.5rem;
    color: #721c24;
  }
  .payout-actions {
    margin-bottom: 2rem;

    .action-buttons {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;

      .button {
        background: var(--primary-orange);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        transition: all 0.2s ease;
        text-decoration: none;
        justify-content: center;
        min-width: 200px;
      }

      .button:hover {
        background: #e67e22;
        transform: translateY(-1px);
      }

      .button:disabled {
        background: #e5e7eb;
        color: #b1b5bb;
        cursor: not-allowed;
        transform: none;
      }

      .button-note {
        color: #dc3545;
        font-size: 0.9em;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-top: 0.5rem;

        i {
          color: #dc3545;
        }
      }

      .bolt11-input-section {
        margin-bottom: 1.5rem;
        padding: 1rem;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        background: #f8f9fa;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
      }

      .bolt11-label {
        display: block;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: #495057;
      }

      .bolt11-label i {
        color: var(--primary-orange);
        margin-right: 0.5rem;
      }

      .bolt11-input {
        width: 100%;
        max-width: 100%;
        padding: 0.75rem;
        border: 1px solid #ced4da;
        border-radius: 4px;
        font-family: monospace;
        font-size: 0.875rem;
        resize: vertical;
        min-height: 80px;
        box-sizing: border-box;
        overflow-x: auto;
        word-wrap: break-word;
        white-space: pre-wrap;
      }

      .bolt11-input:focus {
        outline: none;
        border-color: var(--primary-orange);
        box-shadow: 0 0 0 2px rgba(247, 147, 26, 0.25);
      }

      .bolt11-help {
        margin-top: 0.5rem;
        font-size: 0.875rem;
        color: #6c757d;
      }

      .bolt11-help i {
        color: var(--primary-orange);
        margin-right: 0.25rem;
      }
    }

    .payout-status-message {
      margin-bottom: 1.5rem;
      padding: 1rem;
      border-radius: 8px;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-weight: 500;
    }

    .payout-status-message.success {
      background-color: #d4edda;
      border: 1px solid #c3e6cb;
      color: #155724;
    }

    .payout-status-message.success i {
      color: #28a745;
    }

    .payout-status-message.error {
      background-color: #f8d7da;
      border: 1px solid #f5c6cb;
      color: #721c24;
    }

    .payout-status-message.error i {
      color: #dc3545;
    }
  }

  .payout-details {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fff;

    .section-subtitle {
      margin: 0 0 1rem 0;
      color: #333;
      font-size: 1.1rem;
      font-weight: 600;
    }

    .topics-payments {
      .section-name {
        margin: 1rem 0 0.5rem 0;
        color: #555;
        font-size: 1rem;
        font-weight: 600;
      }

      .topic-payment-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        border: 1px solid #e9ecef;
        border-radius: 4px;
        margin-bottom: 0.5rem;
        background: #f8f9fa;

        .topic-info {
          display: flex;
          flex-direction: column;
          gap: 0.25rem;

          .topic-name {
            font-weight: 600;
            color: #333;
          }

          .topic-payment-amount {
            display: flex;
            align-items: center;
            gap: 0.25rem;

            .topic-amount-unit {
              color: #666;
            }

            .sats-received {
              font-weight: 600;
              color: var(--primary-orange);
            }
          }
        }

        .topic-payment-count {
          color: #666;
          font-size: 0.9em;
        }
      }
    }
  }
}

/* Topic Show Page Styles */
.topic-show {
  .page-header-row {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
  }

  .topic-title {
    margin: 0;
    color: #333;
    font-size: 2rem;
    font-weight: 600;
  }

  .header-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
  }

  .topic-link-row {
    margin-bottom: 1rem;

    .topic-link-show {
      color: var(--primary-orange);
      text-decoration: none;
      font-size: 1rem;
      line-height: 1.4;

      &:hover {
        text-decoration: underline;
      }
    }
  }

  .lnurl-section {
    margin: 1.5rem 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fff;

    .vote-using-lnurl {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 1rem;
      font-weight: 600;
      margin-bottom: 1rem;
    }

    .lnurl-link {
      color: var(--primary-orange);
      text-decoration: none;
      font-weight: 600;

      &:hover {
        text-decoration: underline;
      }
    }

    .or-text {
      text-align: center;
      font-weight: 600;
      font-size: 1.2rem;
      margin: 1rem 0;
      color: #666;
    }

    .copy-lnurl {
      margin: 1rem 0;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .copy-button {
      background: var(--primary-orange);
      color: white;
      border: none;
      border-radius: 4px;
      padding: 0.5rem 1rem;
      font-size: 0.9rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s;

      &:hover {
        background: #e67e22;
      }
    }

    .lnurl-text {
      word-break: break-all;
      font-family: monospace;
      background: #f8f9fa;
      padding: 1rem;
      border-radius: 4px;
      margin: 1rem 0;
      font-size: 0.9rem;
      border: 1px solid #e9ecef;
    }
  }

  .current-status {
    margin: 1.5rem 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fff;

    .current-status-title {
      font-weight: 600;
      font-size: 1.1rem;
      margin-bottom: 1rem;
      color: #333;
    }

    .sats-received-row {
      margin-bottom: 0.5rem;
      font-size: 1rem;
      color: #555;

      &:last-child {
        margin-bottom: 0;
      }
    }
  }

  .back-to-topic-list {
    margin: 1.5rem 0;

    a {
      color: var(--primary-orange);
      text-decoration: none;
      font-weight: 600;

      &:hover {
        text-decoration: underline;
      }
    }
  }

  .qr-code-section {
    margin: 1.5rem 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fff;
    text-align: center;

    h3 {
      margin-top: 0;
      margin-bottom: 1rem;
      color: #333;
      font-size: 1.2rem;
      font-weight: 600;
    }

    img {
      border-radius: 4px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
  }
}

/* Custom Checkbox Styles */
.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0;
  font-weight: 500;
  color: #555;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox .checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.custom-checkbox:hover input ~ .checkmark {
  border-color: var(--primary-orange);
}

.custom-checkbox input:checked ~ .checkmark {
  background-color: var(--primary-orange);
  border-color: var(--primary-orange);
}

.custom-checkbox .checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
}

/* Topics New  */
.new-topic-seminar-number {
  font-size: 2rem;
  color: rgb(78, 76, 76);
}

.new-topic-form-container {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  background: #fff;
  margin-top: 1.5rem;
  max-width: 600px;
}
