/*
 * D-Tracker Dashboard Settings Modal Styles
 * Copyright (c) 2025 Deepraj Mukhopadhyay
 * All rights reserved.
 */

/* Settings Container Styles */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
}

/* Settings Section */
.settings-section {
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.settings-section:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Section Header */
.section-header {
  padding: 15px 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.section-icon {
  font-size: 24px;
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ffe7ce;
}

.section-header h2 {
  flex: 1;
  font-size: 18px;
  color: #333;
}

.section-arrow {
  font-size: 12px;
  color: #777;
  transition: transform 0.3s ease;
}

.settings-section.collapsed .section-arrow {
  transform: rotate(-90deg);
}

/* Section Content */
.section-content {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.settings-section.collapsed .section-content {
  max-height: 0;
}

/* Setting Item */
.setting-item {
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
}

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

.setting-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.setting-info {
  display: flex;
  align-items: center;
  flex: 1;
}

.setting-icon {
  font-size: 20px;
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f9f3e5;
}

.setting-label {
  flex: 1;
}

.setting-label h3 {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin-bottom: 2px;
}

.setting-label p {
  font-size: 14px;
  color: #777;
  margin: 0;
}

.setting-control {
  display: flex;
  align-items: center;
  min-width: 80px;
  justify-content: flex-end;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

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

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

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

input:checked + .toggle-slider {
  background-color: #e85c2f;
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

/* Save Notification */
.save-notification {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #8acb88;
  color: white;
  padding: 12px 25px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: bottom 0.3s ease-in-out;
  z-index: 1100;
}

.save-notification.show {
  bottom: 20px;
}

/* Media Queries */
@media (max-width: 768px) {
  .setting-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .setting-control {
    margin-top: 10px;
    margin-left: 51px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .settings-container {
    padding: 10px;
  }
  
  .section-header {
    padding: 10px 15px;
  }
  
  .section-icon {
    width: 32px;
    height: 32px;
    font-size: 18px;
    margin-right: 10px;
  }
  
  .setting-item {
    padding: 10px 15px;
  }
  
  .setting-icon {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  
  .setting-label h3 {
    font-size: 14px;
  }
  
  .setting-label p {
    font-size: 12px;
  }
  
  .setting-control {
    margin-left: 38px;
  }
}
