/* Base Styles & Variables */
:root {
    --primary: #e50914;
    --secondary: #b20710;
    --primary-light: #ff3b43;
    --primary-transparent: rgba(229, 9, 20, 0.1);
    --text: #ffffff;
    --text-secondary: #b3b3b3;
    --text-tertiary: #737373;
    --background: #141414;
    --surface: #1f1f1f;
    --surface-light: #2a2a2a;
    --surface-lighter: #333333;
    --border: #333333;
    --border-light: #444444;
    --success: #46d369;
    --success-bg: rgba(70, 211, 105, 0.15);
    --warning: #ffc107;
    --warning-bg: rgba(255, 193, 7, 0.15);
    --danger: #dc3545;
    --danger-bg: rgba(220, 53, 69, 0.15);
    --info: #0071eb;
    --info-bg: rgba(0, 113, 235, 0.15);
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
    padding: 0;
}

/* Container */
.volunteer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Header */
.volunteer-header {
    margin-bottom: 32px;
}

.volunteer-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.volunteer-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 600px;
}

/* Success Message */
.volunteer-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    background-color: var(--success-bg);
    border-left: 4px solid var(--success);
}

.volunteer-message-icon {
    font-size: 20px;
    color: var(--success);
}

.volunteer-message-text {
    color: var(--success);
    font-weight: 500;
}

/* Card */
.volunteer-card {
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

.volunteer-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.volunteer-card-title {
    font-size: 18px;
    font-weight: 600;
}

.volunteer-card-actions {
    color: var(--text-secondary);
    font-size: 14px;
}

.volunteer-card-body {
    padding: 0;
}

/* Week Navigation */
.week-navigation {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background-color: var(--surface-light);
}

.week-selector {
    flex: 1;
    margin: 0 12px;
}

.week-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--text);
    font-size: 14px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b3b3b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.week-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-transparent);
}

.week-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.week-nav-btn:hover:not(.disabled) {
    background-color: var(--surface-lighter);
    border-color: var(--border-light);
}

.week-nav-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Week Container */
.week-container {
    animation: fadeIn 0.3s ease;
}

.week-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.week-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.week-shift-count {
    font-size: 14px;
    color: var(--text-secondary);
    background-color: var(--surface-light);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Table */
.volunteer-table-wrapper {
    overflow-x: auto;
}

.volunteer-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text);
}
    .answer-buttons { display: flex; gap: 8px; }
    .answer-button { 
      padding: 8px 12px; 
      border-radius: 4px; 
      font-size: 14px; 
      font-weight: 500; 
      cursor: pointer; 
      transition: all 0.2s ease; 
      border: 1px solid var(--border); 
      background-color: var(--surface-light); 
      color: var(--text-secondary); 
      position: relative; 
    }
    .answer-button:hover { background-color: var(--surface-lighter); color: var(--text); }
    .answer-button.selected { background-color: var(--primary); color: var(--text); border-color: var(--primary); }
    
    /* Toast notification */
    .toast {
      position: fixed;
      bottom: 20px;
      right: 20px;
      padding: 12px 16px;
      border-radius: 4px;
      color: white;
      font-weight: 500;
      opacity: 0;
      transform: translateY(10px);
      transition: opacity 0.3s, transform 0.3s;
      z-index: 1000;
      display: flex;
      align-items: center;
      gap: 8px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .toast.success {
      background-color: var(--success, #46d369);
    }
    
    .toast.error {
      background-color: var(--danger, #dc3545);
    }
    
    .toast.show {
      opacity: 1;
      transform: translateY(0);
    }
    
    /* Saving indicator */
    .saving-indicator {
      display: inline-block;
      width: 14px;
      height: 14px;
      margin-left: 8px;
      border-radius: 50%;
      border: 2px solid var(--primary, #e50914);
      border-top-color: transparent;
      animation: spin 0.8s linear infinite;
      vertical-align: middle;
      display: none;
    }
    
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    
    @media (max-width: 768px) {
      .answer-buttons { flex-wrap: wrap; }
      .answer-button { flex: 1; min-width: 60px; text-align: center; }
    }

.volunteer-table th {
    background-color: var(--surface-lighter);
    color: var(--text);
    font-weight: 600;
    text-align: left;
    padding: 14px 16px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.volunteer-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.volunteer-table tr:last-child td {
    border-bottom: none;
}

.volunteer-table tr:hover {
    background-color: var(--surface-light);
}

/* No shifts message */
.no-shifts-message {
    text-align: center;
    padding: 40px 0 !important;
}

.no-shifts-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-tertiary);
}

.no-shifts-content i {
    font-size: 24px;
    opacity: 0.7;
}

/* Date column */
.volunteer-table .date-column {
    white-space: nowrap;
    font-weight: 500;
}

/* Time column */
.volunteer-table .time-column {
    white-space: nowrap;
    color: var(--text-secondary);
}

/* Extra column */
.volunteer-table .extra-column {
    text-align: center;
}

.extra-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    background-color: var(--primary-transparent);
    color: var(--primary-light);
}

.extra-badge.none {
    background-color: transparent;
    color: var(--text-tertiary);
}

/* Select Dropdown */
.volunteer-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background-color: var(--surface-light);
    color: var(--text);
    font-size: 14px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b3b3b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.volunteer-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-transparent);
}

.volunteer-select option {
    background-color: var(--surface);
    color: var(--text);
}

/* Button */
.volunteer-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    background-color: var(--primary);
    color: var(--text);
}

.volunteer-button:hover {
    background-color: var(--primary-light);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.volunteer-button:active {
    transform: translateY(0);
}

.volunteer-button i {
    font-size: 16px;
}

/* Form Footer */
.volunteer-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background-color: var(--surface-light);
}

/* Week Navigation Compact (for mobile) */
.week-navigation-compact {
    display: flex;
    gap: 8px;
}

.week-nav-btn-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--text-secondary);
}

.week-nav-btn-compact:hover:not(.disabled) {
    background-color: var(--surface-lighter);
    color: var(--text);
}

.week-nav-btn-compact.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty State */
.volunteer-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-tertiary);
}

.volunteer-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.volunteer-empty-text {
    font-size: 16px;
    margin-bottom: 24px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .volunteer-container {
        padding: 16px;
    }
    
    .volunteer-header {
        margin-bottom: 24px;
    }
    
    .volunteer-title {
        font-size: 24px;
    }
    
    .week-navigation {
        padding: 12px 16px;
    }
    
    .week-navigation-compact {
        display: flex;
    }
    
    .volunteer-form-footer {
        flex-direction: column;
        gap: 16px;
    }
    
    .volunteer-button {
        width: 100%;
    }
    
    .week-title {
        font-size: 15px;
    }
    
    .volunteer-table th,
    .volunteer-table td {
        padding: 12px;
    }
}

@media (min-width: 769px) {
    .week-navigation-compact {
        display: none;
    }
}
/* Footer */
.volunteer-footer {
    margin-top: 24px;
    display: flex;
    justify-content: center;
  }
  
  .volunteer-footer .volunteer-btn {
    min-width: 200px;
    justify-content: center;
  }
  
  /* Button styles */
  .volunteer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    text-decoration: none;
  }
  
  .volunteer-btn-secondary {
    background-color: var(--surface-light, #2a2a2a);
    color: var(--text, #ffffff);
    border: 1px solid var(--border, #333333);
  }
  
  .volunteer-btn-secondary:hover {
    background-color: var(--surface-lighter, #333333);
  }
  
  @media (max-width: 768px) {
    .volunteer-footer .volunteer-btn {
      width: 100%;
    }
  }