/* Crew Requests Component Styles */

.dashboard {
  background: #1A1A1A;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #2A2A2A;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: space-between;
  align-items: center;
}

.header-actions {
  display: flex;
  gap: 1rem;
}

.view-toggle-btn {
  background: #666666;
  color: #FFFFFF;
}

.view-toggle-btn:hover:not(:disabled) {
  background: #777777;
}

button {
  padding: 12px 24px;
  background: #D97732;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover:not(:disabled) {
  background: #E88A4A;
}

button:disabled {
  background: #2A2A2A;
  cursor: not-allowed;
  color: #999999;
}

.refresh-btn {
  background: #4CAF50;
}

.refresh-btn:hover:not(:disabled) {
  background: #45a049;
}

.new-request-btn {
  background: #2196F3;
}

.new-request-btn:hover:not(:disabled) {
  background: #1976D2;
}

.error {
  background: #1A1A1A;
  color: #F44336;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid #2A2A2A;
}

.requests-container h2 {
  color: #FFFFFF;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.requests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.request-card {
  background: #1A1A1A;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #2A2A2A;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.request-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #D97732;
  font-weight: 700;
}

.request-field {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.request-field strong {
  color: #FFFFFF;
  text-transform: capitalize;
  font-weight: 700;
}

/* Loading Styles */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #CCCCCC;
}

.loading-container p {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: #FFFFFF;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #2A2A2A;
  border-top: 3px solid #D97732;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.background-loading {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #1A1A1A;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid #2A2A2A;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  color: #CCCCCC;
  font-size: 0.9rem;
  z-index: 100;
}

.mini-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #2A2A2A;
  border-top: 2px solid #D97732;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #1A1A1A;
  border-radius: 8px;
  border: 1px solid #2A2A2A;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #2A2A2A;
}

.modal-header h3 {
  margin: 0;
  color: #D97732;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  color: #CCCCCC;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.close-btn:hover {
  background: #2A2A2A;
  color: #FFFFFF;
}

.modal-body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.9rem;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  background: #2A2A2A;
  border: 1px solid #404040;
  border-radius: 4px;
  color: #FFFFFF;
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus {
  outline: none;
  border-color: #D97732;
  box-shadow: 0 0 0 2px rgba(217, 119, 50, 0.2);
}

.form-group select {
  width: 100%;
  padding: 0.75rem;
  background: #2A2A2A;
  border: 1px solid #404040;
  border-radius: 4px;
  color: #FFFFFF;
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  box-sizing: border-box;
  cursor: pointer;
}

.form-group select:focus {
  outline: none;
  border-color: #D97732;
  box-shadow: 0 0 0 2px rgba(217, 119, 50, 0.2);
}

.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background: #2A2A2A;
  border: 1px solid #404040;
  border-radius: 4px;
  color: #FFFFFF;
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  box-sizing: border-box;
  resize: vertical;
  min-height: 80px;
}

.form-group textarea:focus {
  outline: none;
  border-color: #D97732;
  box-shadow: 0 0 0 2px rgba(217, 119, 50, 0.2);
}

.disabled-input {
  background: #333333 !important;
  color: #888888 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.disabled-input:focus {
  border-color: #404040 !important;
  box-shadow: none !important;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #2A2A2A;
}

.cancel-btn {
  background: #2A2A2A;
  color: #CCCCCC;
}

.cancel-btn:hover:not(:disabled) {
  background: #404040;
  color: #FFFFFF;
}

.save-btn {
  background: #4CAF50;
}

.save-btn:hover:not(:disabled) {
  background: #45a049;
}

/* Hover effect for request cards */
.request-card:hover {
  border-color: #D97732;
  box-shadow: 0 4px 12px rgba(217, 119, 50, 0.2);
  cursor: pointer;
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* Calendar Styles */
.calendar-view {
  background: #1A1A1A;
  border-radius: 8px;
  border: 1px solid #2A2A2A;
  padding: 1.5rem;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.calendar-title {
  color: #FFFFFF;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.nav-btn {
  background: #2A2A2A;
  color: #CCCCCC;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.2s;
}

.nav-btn:hover {
  background: #404040;
  color: #FFFFFF;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #2A2A2A;
  border-radius: 4px;
  overflow: hidden;
}

.day-header {
  background: #2A2A2A;
  color: #CCCCCC;
  padding: 1rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.calendar-day {
  background: #1A1A1A;
  min-height: 120px;
  padding: 0.5rem;
  position: relative;
}

.calendar-day.empty {
  background: #151515;
}

.calendar-day.has-requests {
  background: #1E1E1E;
}

.day-number {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.day-requests {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.calendar-request {
  background: #D97732;
  color: #FFFFFF;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-request:hover {
  background: #E88A4A;
}

.request-title {
  font-weight: 600;
  font-size: 0.7rem;
}

.request-time {
  font-size: 0.6rem;
  opacity: 0.8;
}
