/* User Settings Page Styling */
/* Uses CSS custom properties set by time-based theming system */
/* All classes use gallery- prefix following development guidelines */

/* User Context Bar (in header_content block) */
.gallery-user-context-section {
    background-color: var(--speech-bg-color) !important;
    border: 2px solid var(--panel-border-color) !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 30px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.gallery-user-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
}

.gallery-user-display-name {
    font-size: 1.5rem !important;
    font-weight: bold !important;
    color: var(--header-footer-bg) !important;
}

.gallery-user-tier-badge {
    background-color: var(--button-color) !important;
    color: var(--featured-text) !important;
    padding: 4px 12px !important;
    border-radius: 15px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    display: inline-block !important;
    width: fit-content !important;
}

.gallery-user-meta {
    color: var(--text-color-secondary) !important;
    font-size: 0.95rem !important;
}

.gallery-user-actions {
    display: flex !important;
    gap: 10px !important;
}

/* Settings Container */
.gallery-settings-container {
    background-color: var(--speech-bg-color) !important;
    border: 2px solid var(--panel-border-color) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    max-width: 900px !important;
    margin: 0 auto !important;
}

.gallery-settings-header {
    background-color: var(--header-footer-bg) !important;
    color: var(--featured-text) !important;
    padding: 20px !important;
    text-align: center !important;
}

.gallery-settings-header h1 {
    font-size: 2rem !important;
    margin-bottom: 5px !important;
}

.gallery-settings-header p {
    margin: 0 !important;
    opacity: 0.9 !important;
}

.gallery-settings-content {
    padding: 30px !important;
}

/* Settings Sections */
.gallery-settings-section {
    margin-bottom: 40px !important;
    padding-bottom: 30px !important;
    border-bottom: 1px solid var(--panel-border-color) !important;
}

.gallery-settings-section:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.gallery-section-title {
    font-size: 1.3rem !important;
    color: var(--header-footer-bg) !important;
    margin-bottom: 15px !important;
    font-weight: 600 !important;
}

.gallery-subsection-title {
    font-size: 1.1rem !important;
    color: var(--text-color) !important;
    margin-bottom: 15px !important;
    font-weight: 600 !important;
}

/* Form Elements */
.gallery-form-group {
    margin-bottom: 20px !important;
}

.gallery-form-label {
    display: block !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    color: var(--text-color) !important;
}

.gallery-form-control {
    width: 100% !important;
    padding: 12px !important;
    border: 2px solid var(--panel-border-color) !important;
    border-radius: 4px !important;
    font-size: 1rem !important;
    background-color: var(--main-bg-color) !important;
    color: var(--text-color) !important;
    font-family: inherit !important;
}

.gallery-form-control:disabled {
    background-color: var(--panel-bg-color) !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

.gallery-form-control:focus {
    outline: none !important;
    border-color: var(--button-color) !important;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2) !important;
}

.gallery-form-help {
    font-size: 0.9rem !important;
    color: var(--text-color-secondary) !important;
    margin-top: 5px !important;
}

/* Privacy Settings */
.gallery-privacy-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

.gallery-privacy-option {
    display: flex !important;
    align-items: center !important;
    padding: 15px !important;
    border: 2px solid var(--panel-border-color) !important;
    border-radius: 6px !important;
    background-color: var(--panel-bg-color) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.gallery-privacy-option:hover {
    border-color: var(--button-color) !important;
    background-color: var(--speech-bg-color) !important;
}

.gallery-privacy-option input[type="radio"] {
    margin-right: 12px !important;
    transform: scale(1.2) !important;
    cursor: pointer !important;
}

.gallery-privacy-label {
    flex-grow: 1 !important;
    cursor: pointer !important;
}

.gallery-privacy-title {
    font-weight: 600 !important;
    margin-bottom: 3px !important;
    color: var(--text-color) !important;
}

.gallery-privacy-description {
    font-size: 0.9rem !important;
    color: var(--text-color-secondary) !important;
}

/* Platform Connections */
.gallery-platform-intro {
    margin-bottom: 15px !important;
    color: var(--text-color-secondary) !important;
}

.gallery-existing-connections {
    margin-bottom: 20px !important;
}

.gallery-connection-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 15px !important;
    background-color: var(--speech-bg-color) !important;
    border: 1px solid var(--panel-border-color) !important;
    border-radius: 4px !important;
    margin-bottom: 8px !important;
}

.gallery-connection-status {
    font-size: 0.9rem !important;
    padding: 3px 8px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
}

.gallery-status-verified {
    background-color: #27ae60 !important;
    color: white !important;
}

.gallery-status-pending {
    background-color: #f39c12 !important;
    color: white !important;
}

.gallery-status-rejected {
    background-color: #e74c3c !important;
    color: white !important;
}

/* Platform Grid */
.gallery-platform-grid {
    display: grid !important;
    gap: 15px !important;
    margin-top: 15px !important;
}

.gallery-platform-item {
    border: 2px solid var(--panel-border-color) !important;
    border-radius: 6px !important;
    padding: 15px !important;
    background-color: var(--panel-bg-color) !important;
}

.gallery-platform-header {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 10px !important;
}

.gallery-platform-checkbox {
    margin-top: 2px !important;
    transform: scale(1.2) !important;
    cursor: pointer !important;
}

.gallery-platform-info {
    flex-grow: 1 !important;
}

.gallery-platform-name {
    font-weight: 600 !important;
    margin-bottom: 3px !important;
    color: var(--text-color) !important;
    cursor: pointer !important;
}

.gallery-platform-example {
    font-size: 0.85rem !important;
    color: var(--text-color-secondary) !important;
    font-style: italic !important;
}

.gallery-platform-input {
    width: 100% !important;
    margin-top: 8px !important;
    padding: 8px !important;
    border: 1px solid var(--panel-border-color) !important;
    border-radius: 4px !important;
    background-color: var(--main-bg-color) !important;
    color: var(--text-color) !important;
    display: none !important;
}

.gallery-platform-input.gallery-platform-input-show {
    display: block !important;
}

.gallery-platform-input:focus {
    outline: none !important;
    border-color: var(--button-color) !important;
}

/* Buttons */
.gallery-button {
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    min-height: 44px !important;
    font-family: inherit !important;
}

.gallery-button-secondary {
    background-color: var(--panel-bg-color) !important;
    color: var(--text-color) !important;
    border: 2px solid var(--panel-border-color) !important;
}

.gallery-button-secondary:hover {
    background-color: var(--panel-border-color) !important;
}

.gallery-button-primary {
    background-color: var(--button-color) !important;
    color: var(--featured-text) !important;
    border: 2px solid var(--button-color) !important;
}

.gallery-button-primary:hover {
    background-color: #b8941f !important;
    border-color: #b8941f !important;
}

/* Form Actions */
.gallery-form-actions {
    display: flex !important;
    gap: 15px !important;
    justify-content: center !important;
    padding-top: 30px !important;
    border-top: 2px solid var(--panel-border-color) !important;
    margin-top: 30px !important;
}

/* Messages */
.gallery-success-message {
    background-color: #d4edda !important;
    border: 1px solid #c3e6cb !important;
    color: #155724 !important;
    padding: 15px !important;
    border-radius: 4px !important;
    margin-bottom: 20px !important;
}

.gallery-error-message {
    background-color: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    color: #721c24 !important;
    padding: 15px !important;
    border-radius: 4px !important;
    margin-bottom: 20px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-user-context-section {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .gallery-user-actions {
        align-self: stretch !important;
    }

    .gallery-button {
        flex: 1 !important;
    }

    .gallery-settings-content {
        padding: 20px !important;
    }

    .gallery-form-actions {
        flex-direction: column !important;
    }

    .gallery-platform-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Theme-specific adjustments */
.theme-night .gallery-platform-input,
.theme-night .gallery-form-control {
    filter: brightness(0.95) contrast(1.05) !important;
}

.theme-evening .gallery-settings-container {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}