/* Settings Section Styles
 * Version: 1.9.0
 *
 * Full-screen settings with fixed header
 * Header stays fixed like top/bottom nav, content scrolls
 */

/* ============================================
   SETTINGS SECTION CONTAINER
   ============================================ */

#settings-section {
    display: none;
    padding: 165px 20px 110px;
    min-height: 100vh;
    width: 100%;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    overflow: visible;
}

.settings-section {
    width: 100%;
    position: relative;
}

/* ============================================
   FIXED HEADER (stays at top, doesn't scroll)
   ============================================ */

.settings-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    position: fixed;
    top: 85px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 428px;
    z-index: 90;
}

body.dark-mode .settings-header {
    background: rgba(45, 55, 72, 0.95);
}

.settings-back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4CAF50;
    font-size: 18px;
    position: relative;
    z-index: 1;
}

.settings-back-btn:hover {
    background: rgba(76, 175, 80, 0.2);
    transform: scale(1.05);
}

.settings-title-wrapper {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    pointer-events: none;
}

.settings-title {
    font-size: 24px;
    font-weight: bold;
    color: #2d5016;
    margin: 0;
    pointer-events: auto;
}

body.dark-mode .settings-title {
    color: #4CAF50;
}

/* ============================================
   SCROLLABLE CONTENT AREA
   ============================================ */

.settings-content {
    width: 100%;
}

/* ============================================
   ACCOUNT CARD
   ============================================ */

.account-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    margin: 8px auto 8px auto;
    max-width: 428px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
}

body.dark-mode .account-card {
    background: rgba(60, 70, 85, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.account-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d5016, #4CAF50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
}

.account-info {
    flex: 1;
}

.account-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

body.dark-mode .account-name {
    color: #e0e0e0;
}

.account-status {
    font-size: 14px;
    color: #666;
}

body.dark-mode .account-status {
    color: #999;
}

.login-btn {
    background: linear-gradient(135deg, #2d5016, #4CAF50);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    letter-spacing: 0.5px;
    margin: 8px 0 8px 0;
    text-transform: uppercase;
}

body.dark-mode .section-header {
    color: #999;
}

/* ============================================
   SETTINGS CARDS
   ============================================ */

.settings-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px;
    margin: 0 auto 8px auto;
    max-width: 428px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.dark-mode .settings-card {
    background: rgba(60, 70, 85, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   SETTING ITEMS
   ============================================ */

.setting-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

body.dark-mode .setting-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Parameter Icon (colorful) */
.param-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Info Icon */
.info-icon {
    color: #2196F3;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.info-icon:hover {
    transform: scale(1.2);
}

/* Setting Label */
.setting-label {
    flex: 1;
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

body.dark-mode .setting-label {
    color: #e0e0e0;
}

/* Warning Icon - hidden by default, shown when field is invalid */
.warning-icon {
    color: #FF9800;
    font-size: 14px;
    animation: pulse 2s ease-in-out infinite;
    display: none; /* Hidden by default */
}

.warning-icon.show {
    display: inline-block; /* Show when field is invalid */
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   INPUT FIELDS
   ============================================ */

.setting-input {
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: rgba(255, 255, 255, 0.5);
    min-width: 180px;
}

body.dark-mode .setting-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

/* ============================================
   DROPDOWNS
   ============================================ */

.setting-dropdown {
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: rgba(255, 255, 255, 0.5);
    min-width: 180px;
    cursor: pointer;
}

body.dark-mode .setting-dropdown {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

/* ============================================
   TOGGLE SWITCH (iOS-style)
   ============================================ */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
}

.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: 0.3s;
    border-radius: 31px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 23px;
    width: 23px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #4CAF50;
}

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

/* ============================================
   LOCATION FIELD WITH GPS BUTTON
   ============================================ */

.location-field-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-field-wrapper #locationInput {
    width: 180px;
}

.gps-button {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4CAF50;
    font-size: 14px;
    flex-shrink: 0;
}

.gps-button:hover {
    background: rgba(76, 175, 80, 0.2);
    transform: scale(1.05);
}

.gps-button:active {
    transform: scale(0.95);
}

body.dark-mode .gps-button {
    background: rgba(76, 175, 80, 0.15);
}

/* Location search button */
.location-search-button {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2196F3;
    font-size: 14px;
    flex-shrink: 0;
    margin-left: 8px;
}

.location-search-button:hover {
    background: rgba(33, 150, 243, 0.2);
    transform: scale(1.05);
}

.location-search-button:active {
    transform: scale(0.95);
}

.location-search-button:disabled {
    background: rgba(158, 158, 158, 0.1);
    color: #9E9E9E;
    cursor: not-allowed;
    transform: none;
}

.location-search-button:disabled:hover {
    transform: none;
}

body.dark-mode .location-search-button {
    background: rgba(33, 150, 243, 0.15);
}

body.dark-mode .location-search-button:disabled {
    background: rgba(158, 158, 158, 0.15);
}

/* ============================================
   PRAYER TIME ADJUSTMENTS
   ============================================ */

.adjustments-section {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .adjustments-section {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.adjustments-header {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-mode .adjustments-header {
    color: #999;
}

.reset-adjustments-btn {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #FF9800;
    font-size: 12px;
}

.reset-adjustments-btn:hover {
    background: rgba(255, 152, 0, 0.2);
    transform: scale(1.05);
}

.reset-adjustments-btn:active {
    transform: scale(0.95);
}

body.dark-mode .reset-adjustments-btn {
    background: rgba(255, 152, 0, 0.15);
}

.adjustment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.adjustment-label {
    width: 70px;
    font-size: 14px;
    color: #666;
}

body.dark-mode .adjustment-label {
    color: #999;
}

.adjustment-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.1);
    outline: none;
    -webkit-appearance: none;
}

body.dark-mode .adjustment-slider {
    background: rgba(255, 255, 255, 0.1);
}

.adjustment-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.adjustment-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: none;
}

.adjustment-value {
    min-width: 50px;
    text-align: right;
    font-size: 14px;
    color: #4CAF50;
    font-weight: 600;
}

/* ============================================
   ABOUT APP ITEM (CLICKABLE)
   ============================================ */

.about-app-item {
    cursor: pointer;
    transition: background 0.2s ease;
}

.about-app-item:hover {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
}

body.dark-mode .about-app-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .setting-input,
    .setting-dropdown {
        min-width: 120px;
    }
}
