/* Dashboard Layout & Reordering */
.dashboard-widget-hidden {
    display: none !important;
}

.custom-dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px;
    width: 100%;
}

.dashboard-widget {
    transition: all 0.3s ease;
}

/* Configure Button - Circular Gear FAB Style */
.customize-dashboard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--theme-accent, #0078d4);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-sizing: border-box;
}

.customize-dashboard-btn:hover {
    background: var(--theme-accent-hover, #005a9e);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.customize-dashboard-btn i {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 20px;
}

/* Custom Modal Overlay */
.dashboard-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.dashboard-modal {
    background: var(--theme-background, #ffffff);
    color: var(--theme-text, #333333);
    border: 1px solid var(--theme-border, #dddddd);
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.25s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.dashboard-modal-header {
    padding: 16px;
    border-bottom: 1px solid var(--theme-border, #dddddd);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.dashboard-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--theme-text, #333333);
    font-size: 20px;
}

.dashboard-modal-body {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.dashboard-modal-footer {
    padding: 16px;
    border-top: 1px solid var(--theme-border, #dddddd);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Widget Config List Item */
.widget-config-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--theme-border, #eeeeee);
    gap: 12px;
}

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

.widget-config-drag {
    cursor: grab;
    color: #888888;
}

.widget-config-title {
    flex-grow: 1;
    font-weight: 500;
}

.widget-config-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Switch styling */
.widget-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

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

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

input:checked + .widget-slider {
    background-color: var(--theme-accent, #0078d4);
}

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

/* Sort Buttons */
.widget-sort-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--theme-text, #333333);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.widget-sort-btn:hover {
    opacity: 1;
}

.widget-sort-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* Modal Actions */
.btn-primary {
    background: var(--theme-accent, #0078d4);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--theme-accent-hover, #005a9e);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--theme-border, #dddddd);
    color: var(--theme-text, #333333);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(0,0,0,0.05);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
