/* ===========================
   Resume Maker — Apple-like theme
   Clean, minimal, light UI
   Powered by Alfadev.in
   =========================== */

/* ---- Body: offset below fixed navbar + toolbar ---- */
body {
    background: #f5f5f7;
    color: #1d1d1f;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    padding-top: 112px;
}

/* Cancel the original .rm-layout margin-top to avoid double gap */
.rm-layout {
    margin-top: 0;
    min-height: calc(100vh - 112px);
}

/* ---- Override navbar: always dark, no transparency ---- */
.rm-navbar {
    background: #0a0a0f !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.rm-navbar.scrolled {
    background: #0a0a0f !important;
}

/* ---- Toolbar: frosted glass ---- */
.rm-toolbar {
    top: 52px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.rm-toolbar-title {
    color: #1d1d1f;
}

.rm-toolbar-divider {
    background: rgba(0, 0, 0, 0.1);
}

/* ---- Toolbar Buttons ---- */
.rm-btn-ghost {
    background: transparent;
    color: #1d1d1f;
}

.rm-btn-ghost:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
    border-color: transparent;
}

.rm-btn-primary {
    background: #6366f1;
    color: white;
}

.rm-btn-primary:hover {
    background: #5558e6;
    box-shadow: none;
    transform: none;
}

/* ---- Sidebar (Editor): white ---- */
.rm-sidebar {
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.rm-sidebar-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.rm-sidebar-header h2 {
    color: #1d1d1f;
}

/* Accordion panels */
.rm-accordion {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    margin-bottom: 8px;
    overflow: hidden;
}

.rm-accordion-header {
    background: rgba(0, 0, 0, 0.02);
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 16px;
    cursor: pointer;
}

.rm-accordion-header::-webkit-details-marker {
    display: none;
}

.rm-accordion-body {
    background: #ffffff;
    padding: 16px;
}

/* ---- Form Elements ---- */
.rm-label {
    color: #86868b;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.rm-label input,
.rm-label textarea {
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #1d1d1f;
    font-size: 13px;
    padding: 8px 12px;
    margin-top: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rm-label input:focus,
.rm-label textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    outline: none;
}

.rm-label input::placeholder,
.rm-label textarea::placeholder {
    color: #b0b0b5;
}

/* ---- Sidebar Buttons ---- */
.rm-btn {
    background: #6366f1;
    color: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
}

.rm-btn:hover {
    background: #5558e6;
}

.rm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rm-btn-add {
    background: transparent;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    color: #86868b;
    border-radius: 8px;
    font-size: 13px;
}

.rm-btn-add:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: transparent;
}

.rm-btn-remove {
    background: transparent;
    border: 1px solid #ff3b30;
    color: #ff3b30;
    border-radius: 6px;
}

.rm-btn-remove:hover {
    background: #ff3b30;
    color: white;
}

/* ---- Preview Area ---- */
.rm-preview-area {
    background: #f5f5f7;
}

.rm-preview-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.rm-preview-header h2 {
    color: #1d1d1f;
    font-size: 18px;
}

/* Welcome State */
.rm-welcome {
    padding: 80px 40px;
    text-align: center;
}

.rm-welcome h2 {
    color: #1d1d1f;
    font-size: 24px;
    font-weight: 600;
}

.rm-welcome p {
    color: #86868b;
    font-size: 14px;
}

/* ---- Settings Panel ---- */
.rm-settings-panel {
    background: #ffffff;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.rm-settings-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.rm-settings-header h2 {
    color: #1d1d1f;
}

.rm-theme-selector h3,
.rm-section-toggles h3,
.rm-palette-selector h3 {
    color: #86868b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Theme Cards */
.rm-theme-card {
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rm-theme-card:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
}

.rm-theme-card.rm-active {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
}

.rm-theme-name {
    color: #1d1d1f;
    font-size: 12px;
}

.rm-theme-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

/* Toggle Labels */
.rm-toggle-label {
    color: #1d1d1f;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 10px 0;
}

.rm-toggle-label:last-child {
    border-bottom: none;
}

.rm-toggle-label input[type="checkbox"] {
    accent-color: #6366f1;
}

.rm-toggle-label.rm-drag-over {
    background: rgba(99, 102, 241, 0.08);
    border-top: 2px solid #6366f1;
}

.rm-drag-handle {
    color: #b0b0b5;
}

/* Palette Swatches */
.rm-palette-swatch {
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rm-palette-swatch:hover {
    transform: scale(1.15);
}

.rm-palette-swatch.rm-active {
    border-color: #1d1d1f;
    box-shadow: 0 0 0 2px #ffffff;
}

/* ---- Editor Items ---- */
.rm-editor-item-complex {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.rm-editor-item-complex summary {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.02);
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    list-style: none;
}

.rm-editor-item-complex summary::-webkit-details-marker {
    display: none;
}

.rm-editor-item-complex[open] summary {
    border-bottom-color: #6366f1;
}

.rm-editor-item-body {
    padding: 16px;
    background: #ffffff;
}

.rm-editor-item-body .rm-label {
    margin-bottom: 12px;
}

/* ---- Scrollbar Styling (Light) ---- */
.rm-sidebar-content::-webkit-scrollbar,
.rm-settings-content::-webkit-scrollbar,
.rm-preview-area::-webkit-scrollbar {
    width: 4px;
}

.rm-sidebar-content::-webkit-scrollbar-track,
.rm-settings-content::-webkit-scrollbar-track,
.rm-preview-area::-webkit-scrollbar-track {
    background: transparent;
}

.rm-sidebar-content::-webkit-scrollbar-thumb,
.rm-settings-content::-webkit-scrollbar-thumb,
.rm-preview-area::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* ---- Progress Bar ---- */
.progress-bar {
    background: rgba(0, 0, 0, 0.06);
}

/* ---- Loading State ---- */
.rm-loading {
    color: #86868b;
    text-align: center;
    padding: 40px;
}

/* ---- Toast (Light theme) ---- */
.rm-toast {
    background: #ffffff;
    color: #1d1d1f;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 1024px) {
    .rm-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .rm-sidebar,
    .rm-settings-panel {
        height: auto;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
}

@media (max-width: 768px) {
    .rm-preview-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .rm-preview-actions {
        width: 100%;
    }
    
    .rm-btn-primary {
        flex: 1;
    }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
