/* 
 * Profile & Account Page Styles - Rosewood Ridge Site
 * Web 3.0 Design System
 */

@import url('variables.css');

/* Profile Container */
.profile-container {
  padding: 1rem 0;
}

/* Profile Header */
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.profile-header h1 {
  margin: 0;
}

/* Profile Card */
.profile-card {
  background-color: var(--inner-bg);
  border-radius: var(--border-radius-std);
  overflow: hidden;
  box-shadow: var(--box-shadow-std);
  border: 1px solid var(--accent-color);
}

/* Profile Card Header */
.profile-card-header {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background: var(--gradient-accent);
  position: relative;
}

/* Avatar Container */
.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 60px;
  overflow: hidden;
  border: 4px solid var(--accent-color) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Profile Info */
.profile-info {
  margin-left: 1.5rem;
}

.profile-info h2 {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
  color: var(--text-color);
}

.profile-info h4 {
  margin: 0.5rem 0 0.25rem;
  color: var(--text-color);
}

.profile-info p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-color);
}

/* Profile Roles */
.profile-role {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0.2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
  background-color: var(--accent-color);
  color: var(--text-color);
}

.profile-role:hover {
  transform: translateY(-2px);
}

/* Stats Section */
.profile-stats {
  display: flex;
  background-color: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--accent-color);
  border-bottom: 1px solid var(--accent-color);
}

.stat-item {
  flex: 1;
  padding: 1rem;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
  border-right: none;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.7;
  margin-bottom: 0.3rem;
}

.stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-color);
}

/* Profile Actions */
.profile-actions {
  padding: 1.5rem;
}

.profile-actions h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--accent-color);
  color: var(--text-color);
  font-weight: 600;
}

/* Action Buttons */
.profile-button, 
.profile-button:visited {
  color: #fff !important;
  background-color: var(--success-color);
  border: none;
  border-radius: var(--border-radius-std);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
  margin-right: 10px;
  display: inline-block;
}

.profile-button:hover {
  background-color: #218838;
  transform: translateY(-2px);
  color: #fff !important;
}

.profile-button.hidden {
  display: none;
}

/* Stat Cards */
.stat-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--gradient-accent);
  border-radius: var(--border-radius-std);
  padding: 1.5rem;
  min-width: 150px;
  flex: 1;
  text-align: center;
  box-shadow: var(--box-shadow-light);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--accent-color);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--box-shadow-std);
}

.stat-title {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  opacity: 0.7;
  color: var(--text-color);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
}

/* Admin Section */
.admin-section {
  margin-bottom: 2.5rem;
}

.admin-section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--accent-color);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-header h1 {
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.admin-button,
.admin-button:visited,
.logout-button,
.logout-button:visited,
.return-button, 
.return-button:visited {
  color: #fff !important;
  border: none;
  border-radius: var(--border-radius-std);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
}

.admin-button {
  background-color: #5865f2;
  margin-right: 10px;
}

.admin-button:hover {
  background-color: #4752c4;
  color: #fff !important;
}

.logout-button {
  background-color: var(--error-color);
}

.logout-button:hover {
  background-color: #c93b3e;
  color: #fff !important;
}

.return-button {
  background-color: var(--accent-color);
}

.return-button:hover {
  background-color: var(--highlight-color);
  color: #fff !important;
}

/* Login Card */
.login-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
}

.login-card {
  background: var(--gradient-dark);
  border-radius: var(--border-radius-std);
  padding: 2.5rem;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--box-shadow-std);
  border: 1px solid var(--accent-color);
  text-align: center;
}

.login-card h1 {
  margin-bottom: 1rem;
  font-size: 2.2rem;
  color: var(--text-color);
}

.login-card p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  color: var(--text-color);
}

.login-button-container {
  margin: 2rem 0;
}

.discord-login-button,
.discord-login-button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #5865f2;
  border: none;
  border-radius: var(--border-radius-std);
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
  color: #fff !important;
}

.discord-login-button:hover {
  background-color: #4752c4;
  transform: translateY(-2px);
  color: #fff !important;
}

.discord-login-button svg {
  margin-right: 10px;
}

.login-info {
  margin-top: 2rem;
  font-size: 0.9rem;
  opacity: 0.8;
  color: var(--text-color);
}

/* Admin Table Styles */
.admin-table-container {
  overflow-x: auto;
  border: 1px solid var(--accent-color);
  border-radius: var(--border-radius-std);
  background-color: rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.admin-table {
  width: 100%;
  table-layout: auto;
  margin: 0 auto;
  border-collapse: collapse;
}

.admin-table thead {
  background: var(--gradient-accent);
  color: var(--text-color);
}

.admin-table th {
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
  border: 1px solid var(--accent-color);
}

.admin-table td {
  padding: 0.75rem;
  text-align: center;
  border: 1px solid var(--accent-color);
}

.admin-table tbody tr:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.1);
}

.admin-table tbody tr:nth-child(even) {
  background-color: transparent;
}

.admin-table tbody tr:hover {
  background-color: rgba(125, 56, 45, 0.1);
}

/* Toggle Switch */
.admin-toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.admin-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--accent-color);
  transition: 0.4s;
  border-radius: 24px;
}

.admin-toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: #fff;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .admin-toggle-slider {
  background-color: var(--success-color);
}

input:checked + .admin-toggle-slider:before {
  transform: translateX(26px);
}

/* Alert Messages */
.admin-alert {
  padding: 1rem;
  border-radius: var(--border-radius-std);
  margin-bottom: 1rem;
  text-align: center;
}

.admin-alert.success {
  background-color: rgba(40, 167, 69, 0.2);
  border: 1px solid rgba(40, 167, 69, 0.5);
}

.admin-alert p {
  margin: 0;
  font-size: 1rem;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  border-bottom: 2px solid var(--accent-color);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
}

.tab-button {
  background-color: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.8rem 1.2rem;
  margin-bottom: -2px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-color);
  transition: all 0.3s;
  white-space: nowrap;
}

.tab-button:hover {
  background-color: rgba(126, 126, 126, 0.2);
}

.tab-button.active {
  border-bottom: 2px solid var(--highlight-color);
  background-color: rgba(117, 117, 117, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .profile-card-header {
    flex-direction: column;
    text-align: center;
  }
  
  .profile-info {
    margin-left: 0;
    margin-top: 1rem;
  }
  
  .profile-stats {
    flex-direction: column;
  }
  
  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .stat-item:last-child {
    border-bottom: none;
  }
  
  .admin-header, 
  .profile-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }
}