/* 
 * Sarah's Bookings - Advanced Features Stylesheet
 * Styles for payments, notifications, and Polly's Bookings
 */

/* -----------------------------
 * Table of Contents
 * -----------------------------
 * 1. Common Styles
 * 2. Payment Processing
 * 3. Notifications
 * 4. Polly's Bookings
 * 5. Responsive Design
 * -----------------------------
 */

/* -----------------------------
 * 1. Common Styles
 * -----------------------------
 */
.advanced-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.advanced-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

.advanced-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.advanced-section-actions {
  display: flex;
  gap: 0.5rem;
}

.advanced-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 1.5rem;
}

.advanced-tab {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-weight: 500;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.advanced-tab:hover {
  color: #3498db;
}

.advanced-tab.active {
  color: #3498db;
  border-bottom-color: #3498db;
}

.advanced-tab-content {
  display: none;
}

.advanced-tab-content.active {
  display: block;
}

/* -----------------------------
 * 2. Payment Processing
 * -----------------------------
 */
.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.payment-method {
  flex: 1;
  min-width: 120px;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-method:hover {
  border-color: #3498db;
  background-color: #f8f9fa;
}

.payment-method.selected {
  border-color: #3498db;
  background-color: #ebf5fb;
}

.payment-method-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.payment-method-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.payment-form {
  margin-top: 1.5rem;
}

.payment-form-group {
  margin-bottom: 1.25rem;
}

.payment-form-row {
  display: flex;
  gap: 1rem;
}

.payment-form-col {
  flex: 1;
}

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

.payment-form input,
.payment-form select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.payment-form input:focus,
.payment-form select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.payment-summary {
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.payment-summary-header {
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.payment-summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.payment-summary-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0e0;
}

.payment-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-history {
  margin-top: 2rem;
}

.payment-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.payment-history-item:last-child {
  border-bottom: none;
}

.payment-history-details {
  flex: 1;
}

.payment-history-amount {
  font-weight: 600;
  color: #2c3e50;
}

.payment-history-date {
  font-size: 0.9rem;
  color: #777;
}

.payment-history-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.payment-history-status.completed {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.payment-history-status.pending {
  background-color: #fff8e1;
  color: #f57c00;
}

.payment-history-status.failed {
  background-color: #ffebee;
  color: #c62828;
}

.payment-history-actions {
  margin-left: 1rem;
}

/* -----------------------------
 * 3. Notifications
 * -----------------------------
 */
.notification-center {
  max-height: 500px;
  overflow-y: auto;
}

.notification-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.notification-filter {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  background-color: #f5f5f5;
  transition: all 0.2s ease;
}

.notification-filter:hover {
  background-color: #e0e0e0;
}

.notification-filter.active {
  background-color: #3498db;
  color: white;
}

.notification-item {
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.notification-item:hover {
  background-color: #f8f9fa;
}

.notification-item.unread {
  background-color: #ebf5fb;
}

.notification-item.unread:hover {
  background-color: #d6eaf8;
}

.notification-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.notification-item-title {
  font-weight: 600;
  color: #2c3e50;
}

.notification-item-time {
  font-size: 0.85rem;
  color: #777;
}

.notification-item-content {
  color: #555;
  margin-bottom: 0.5rem;
}

.notification-item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.notification-settings {
  margin-top: 2rem;
}

.notification-settings-group {
  margin-bottom: 1.5rem;
}

.notification-settings-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.notification-setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.notification-setting:last-child {
  border-bottom: none;
}

.notification-setting-label {
  display: flex;
  align-items: center;
}

.notification-setting-icon {
  margin-right: 0.75rem;
  color: #3498db;
}

.notification-setting-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.notification-setting-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.notification-setting-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.notification-setting-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .notification-setting-slider {
  background-color: #3498db;
}

input:focus + .notification-setting-slider {
  box-shadow: 0 0 1px #3498db;
}

input:checked + .notification-setting-slider:before {
  transform: translateX(24px);
}

/* -----------------------------
 * 4. Polly's Bookings
 * -----------------------------
 */
.polly-create {
  margin-bottom: 2rem;
}

.polly-form-group {
  margin-bottom: 1.25rem;
}

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

.polly-form-input,
.polly-form-textarea,
.polly-form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.polly-form-input:focus,
.polly-form-textarea:focus,
.polly-form-select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.polly-form-textarea {
  min-height: 100px;
  resize: vertical;
}

.polly-time-slots {
  margin-top: 1rem;
}

.polly-time-slot {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.polly-time-slot-inputs {
  display: flex;
  flex: 1;
  gap: 0.5rem;
}

.polly-time-slot-date,
.polly-time-slot-time {
  flex: 1;
}

.polly-add-slot {
  display: inline-flex;
  align-items: center;
  color: #3498db;
  cursor: pointer;
  margin-top: 0.5rem;
}

.polly-add-slot-icon {
  margin-right: 0.5rem;
}

.polly-participants {
  margin-top: 1.5rem;
}

.polly-participant {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.polly-participant-email {
  flex: 1;
}

.polly-add-participant {
  display: inline-flex;
  align-items: center;
  color: #3498db;
  cursor: pointer;
  margin-top: 0.5rem;
}

.polly-add-participant-icon {
  margin-right: 0.5rem;
}

.polly-options {
  margin-top: 1.5rem;
}

.polly-option {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.polly-option input[type="checkbox"] {
  margin-right: 0.75rem;
}

.polly-grid {
  margin-top: 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.polly-grid-header {
  display: flex;
  background-color: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
}

.polly-grid-header-cell {
  flex: 1;
  padding: 0.75rem;
  font-weight: 600;
  text-align: center;
  border-right: 1px solid #e0e0e0;
}

.polly-grid-header-cell:first-child {
  flex: 2;
  text-align: left;
}

.polly-grid-header-cell:last-child {
  border-right: none;
}

.polly-grid-row {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
}

.polly-grid-row:last-child {
  border-bottom: none;
}

.polly-grid-cell {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  border-right: 1px solid #e0e0e0;
}

.polly-grid-cell:first-child {
  flex: 2;
  text-align: left;
}

.polly-grid-cell:last-child {
  border-right: none;
}

.polly-grid-cell.available {
  background-color: #e8f5e9;
}

.polly-grid-cell.unavailable {
  background-color: #ffebee;
}

.polly-grid-cell.maybe {
  background-color: #fff8e1;
}

.polly-results {
  margin-top: 1.5rem;
}

.polly-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.polly-result-info {
  flex: 1;
}

.polly-result-date {
  font-weight: 600;
  color: #2c3e50;
}

.polly-result-time {
  color: #555;
}

.polly-result-count {
  background-color: #3498db;
  color: white;
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.polly-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
}

/* -----------------------------
 * 5. Responsive Design
 * -----------------------------
 */
@media (max-width: 768px) {
  .payment-form-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .payment-methods {
    flex-direction: column;
  }
  
  .payment-method {
    width: 100%;
  }
  
  .notification-filters {
    flex-wrap: wrap;
  }
  
  .polly-time-slot {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .polly-time-slot-inputs {
    width: 100%;
  }
  
  .polly-grid-header,
  .polly-grid-row {
    flex-direction: column;
  }
  
  .polly-grid-header-cell,
  .polly-grid-cell {
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .polly-grid-header-cell:last-child,
  .polly-grid-cell:last-child {
    border-bottom: none;
  }
}