/* Settings Panel Styles */

/* Settings Icon */
.settings-icon {
    position: relative;
}

.settings-icon a {
    display: block;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    background-color: var(--white);
    transition: var(--transition);
    text-decoration: none;
}

.settings-icon a:hover {
    background-color: var(--gray-light);
}

.settings-icon a:focus {
    box-shadow: 0 0 0 3px rgba(94, 53, 177, 0.2);
}

.settings-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Settings Dropdown Menu */
.settings-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 180px;
    padding: 15px;
    display: none;
}

.settings-dropdown-menu.active {
    display: block;
}

.settings-section {
    margin-bottom: 15px;
}

.settings-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.settings-language-select,
.settings-theme-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray);
    border-radius: 4px;
    background-color: var(--white);
    font-size: 0.9rem;
    cursor: pointer;
    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='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 14px;
}

.settings-language-select:focus,
.settings-theme-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(94, 53, 177, 0.2);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background-color: var(--gray-light);
}

.theme-icon {
    width: 20px;
    height: 20px;
}

/* Theme Selector */
.settings-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.settings-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0;
    flex: 1;
}

/* Dark Mode Specific Styles */
[data-theme="dark"] .settings-dropdown-menu,
.dark-theme .settings-dropdown-menu {
    background-color: var(--dark-card-bg);
    border-color: var(--primary-color);
    color: var(--dark-text);
}

[data-theme="dark"] .settings-section label,
.dark-theme .settings-section label {
    color: var(--dark-text);
}

[data-theme="dark"] .settings-language-select,
[data-theme="dark"] .settings-theme-select,
.dark-theme .settings-language-select,
.dark-theme .settings-theme-select {
    background-color: var(--dark-card-bg);
    color: var(--dark-text);
    border-color: var(--dark-border);
    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='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

[data-theme="dark"] .settings-language-select:focus,
[data-theme="dark"] .settings-theme-select:focus,
.dark-theme .settings-language-select:focus,
.dark-theme .settings-theme-select:focus {
    box-shadow: 0 0 0 2px rgba(94, 53, 177, 0.2);
}

[data-theme="dark"] .theme-toggle-btn:hover,
.dark-theme .theme-toggle-btn:hover {
    background-color: #444444;
}

/* Theme Selection Options */
.theme-options {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.theme-option {
    flex: 1;
    text-align: center;
    padding: 8px;
    border: 2px solid var(--gray);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
}

.theme-option:hover {
    border-color: var(--primary-color);
}

.theme-option.active {
    border-color: var(--primary-color);
    background-color: rgba(94, 53, 177, 0.1);
}

[data-theme="dark"] .theme-option,
.dark-theme .theme-option {
    border-color: var(--dark-border);
}

[data-theme="dark"] .theme-option:hover,
.dark-theme .theme-option:hover {
    border-color: var(--primary-color);
}

[data-theme="dark"] .theme-option.active,
.dark-theme .theme-option.active {
    border-color: var(--primary-color);
    background-color: rgba(94, 53, 177, 0.2);
}

/* Language Selection */
.language-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray);
    border-radius: 4px;
    background-color: var(--white);
    font-size: 0.9rem;
    cursor: pointer;
    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='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 14px;
}

.language-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(94, 53, 177, 0.2);
}

[data-theme="dark"] .language-select,
.dark-theme .language-select {
    background-color: var(--dark-card-bg);
    color: var(--dark-text);
    border-color: var(--dark-border);
    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='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

/* Close button for settings panel */
.settings-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 5px;
    border-radius: 4px;
    transition: var(--transition);
}

.settings-close-btn:hover {
    background-color: var(--gray-light);
    color: var(--primary-color);
}

[data-theme="dark"] .settings-close-btn,
.dark-theme .settings-close-btn {
    color: var(--dark-text);
}

[data-theme="dark"] .settings-close-btn:hover,
.dark-theme .settings-close-btn:hover {
    background-color: #444444;
    color: var(--primary-color);
}

/* Settings panel header */
.settings-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray);
}

[data-theme="dark"] .settings-panel-header,
.dark-theme .settings-panel-header {
    border-bottom: 1px solid var(--dark-border);
}

/* Responsive settings panel */
@media (max-width: 768px) {
    .settings-dropdown-menu {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 400px;
        min-width: auto;
    }
}