/* Profile Settings Page Styles */

/* Base styles extending student dashboard theme */
.profile-container {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95) 0%, rgba(31, 41, 55, 0.95) 100%);
  min-height: 100vh;
  color: #ffffff;
}

/* Profile Hero Section */
.profile-hero {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.9) 0%, rgba(17, 24, 39, 0.95) 100%);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(34, 197, 94, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  pointer-events: none;
}

/* Profile Picture Upload Styles */
.profile-picture-container {
  position: relative;
  display: inline-block;
}

.profile-picture-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid rgba(34, 197, 94, 0.3);
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.8) 0%, rgba(17, 24, 39, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.profile-picture-preview:hover {
  border-color: rgba(34, 197, 94, 0.6);
  transform: scale(1.05);
}

.profile-picture-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-picture-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50%;
}

.profile-picture-preview:hover .profile-picture-overlay {
  opacity: 1;
}

.upload-icon {
  color: #ffffff;
  font-size: 1.5rem;
}

/* Form Section Animations */
.form-section {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.8) 0%, rgba(17, 24, 39, 0.9) 100%);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.form-section:hover {
  border-color: rgba(34, 197, 94, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Tab Navigation */
.profile-tabs {
  border-bottom: 1px solid rgba(75, 85, 99, 0.5);
  margin-bottom: 2rem;
}

.profile-tab {
  position: relative;
  padding: 1rem 1.5rem;
  color: #9ca3af;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.profile-tab:hover {
  color: #ffffff;
  background: rgba(34, 197, 94, 0.1);
}

.profile-tab.active {
  color: #22c55e;
  border-bottom-color: #22c55e;
}

.profile-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.profile-tab:hover::before {
  left: 100%;
}

/* Form Input Styles */
.profile-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 8px;
  color: #ffffff;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.profile-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
  background: rgba(31, 41, 55, 0.9);
}

.profile-input::placeholder {
  color: #9ca3af;
}

.profile-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(17, 24, 39, 0.5);
}

/* Select Dropdown Styles */
.profile-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 8px;
  color: #ffffff;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

.profile-select:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Textarea Styles */
.profile-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 8px;
  color: #ffffff;
  transition: all 0.3s ease;
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.profile-textarea:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Checkbox Styles */
.profile-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.profile-checkbox:checked {
  background: #22c55e;
  border-color: #22c55e;
}

.profile-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Button Styles */
.profile-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.profile-btn-primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.25);
}

.profile-btn-primary:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
}

.profile-btn-secondary {
  background: rgba(59, 130, 246, 0.9);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.25);
}

.profile-btn-secondary:hover {
  background: rgba(37, 99, 235, 0.9);
  transform: translateY(-2px);
}

.profile-btn-danger {
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.25);
}

.profile-btn-danger:hover {
  background: rgba(220, 38, 38, 0.9);
  transform: translateY(-2px);
}

/* Toggle Switch Styles */
.toggle-switch {
  position: relative;
  width: 3rem;
  height: 1.5rem;
  background: rgba(75, 85, 99, 0.8);
  border-radius: 0.75rem;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.toggle-switch.active {
  background: #22c55e;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.25rem;
  height: 1.25rem;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
  transform: translateX(1.5rem);
}

/* Profile Stats Cards */
.profile-stat {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.6) 0%, rgba(17, 24, 39, 0.8) 100%);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.profile-stat:hover {
  border-color: rgba(34, 197, 94, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.profile-stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #22c55e;
  margin-bottom: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
}

.profile-stat-label {
  font-size: 0.875rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Badge Styles */
.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 50px;
  color: #22c55e;
  font-size: 0.875rem;
  font-weight: 500;
  gap: 0.5rem;
}

.profile-badge-pulse {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

/* Error and Success States */
.profile-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.profile-success {
  color: #22c55e;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Loading States */
.profile-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #9ca3af;
}

.profile-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(34, 197, 94, 0.2);
  border-top: 2px solid #22c55e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .profile-hero {
    padding: 1.5rem;
  }
  
  .form-section {
    padding: 1.5rem;
  }
  
  .profile-picture-preview {
    width: 100px;
    height: 100px;
  }
  
  .profile-tabs {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .profile-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .profile-tab {
    padding: 0.75rem 1rem;
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  .profile-hero {
    padding: 1rem;
  }
  
  .form-section {
    padding: 1rem;
  }
  
  .profile-stat {
    padding: 1rem;
  }
  
  .profile-stat-value {
    font-size: 1.5rem;
  }
}

/* Dark theme enhancements */
@media (prefers-color-scheme: dark) {
  .profile-input,
  .profile-select,
  .profile-textarea {
    background: rgba(17, 24, 39, 0.8);
  }
  
  .profile-input:focus,
  .profile-select:focus,
  .profile-textarea:focus {
    background: rgba(17, 24, 39, 0.9);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .profile-input,
  .profile-select,
  .profile-textarea {
    border-width: 2px;
  }
  
  .profile-btn {
    border: 2px solid currentColor;
  }
  
  .form-section {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .profile-tab::before,
  .toggle-switch::after,
  .profile-spinner {
    animation: none;
  }
  
  .form-section,
  .profile-btn,
  .profile-stat {
    transition: none;
  }
}
