/* ============================================
   OnePage Builder - Override & Builder-Only Styles
   Base styles inherited from accounting_office_view_1.css
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Mitr:wght@300;400;500;600;700&display=swap');

/* ============ Reset & Grid (standalone, no Bootstrap) ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Mitr", sans-serif; background: #f0f2f5; color: #212529; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.col-lg-8 { width: 66.666%; padding: 0 15px; }
.col-lg-4 { width: 33.333%; padding: 0 15px; }
.col-md-6 { width: 50%; padding: 0 15px; }
.mb-4 { margin-bottom: 20px; }
.note-editable img, .about-content img, .custom-tab-content-area img { max-width: 100%; height: auto; }

/* ============ Builder Toolbar ============ */
.builder-toolbar { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 9999; background: #fff; padding: 10px 20px; border-radius: 50px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 12px; user-select: none; transition: box-shadow 0.2s; }
.builder-toolbar.dragging { box-shadow: 0 8px 30px rgba(0,0,0,0.25); cursor: grabbing; }
.builder-toolbar .tb-drag { cursor: grab; color: #adb5bd; font-size: 14px; display: flex; align-items: center; padding: 2px 0; transition: color 0.2s; }
.builder-toolbar .tb-drag:hover { color: #6c757d; }
.builder-toolbar.dragging .tb-drag { cursor: grabbing; color: #50bfda; }
.builder-toolbar .tb-label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #495057; }
.builder-toolbar .tb-sep { width: 1px; height: 24px; background: #dee2e6; }
.tb-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 50px; border: none; font-size: 13px; font-weight: 500; cursor: pointer; font-family: "Mitr", sans-serif; transition: all 0.2s; }
.tb-btn-back { background: #f8f9fa; color: #495057; }
.tb-btn-back:hover { background: #e9ecef; }
.tb-btn-preview { background: #6c5ce7; color: #fff; }
.tb-btn-preview:hover { background: #5a4bd1; }
.tb-btn-save { background: #00b894; color: #fff; }
.tb-btn-save:hover { background: #00a381; }
.tb-btn-reset { background: #fee2e2; color: #dc2626; padding: 8px 12px; }
.tb-btn-reset:hover { background: #dc2626; color: #fff; }

/* Toast */
.toast-msg { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px); background: #1e293b; color: #fff; padding: 12px 24px; border-radius: 8px; z-index: 99999; opacity: 0; transition: all 0.3s; font-family: "Mitr", sans-serif; font-size: 14px; }
.toast-msg.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ============ Builder Mode (Edit Controls) ============ */
.editable-section { position: relative; }
.editable-section::before { content: ''; position: absolute; inset: 0; border: 2px dashed transparent; pointer-events: none; z-index: 40; border-radius: 12px; }
.builder-mode .editable-section:hover::before { border-color: #6c5ce7; background: rgba(108,92,231,0.02); }
.edit-btn { position: absolute; top: 8px; right: 8px; z-index: 50; opacity: 0; transition: opacity 0.2s; background: #6c5ce7; color: #fff; border: none; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.builder-mode .editable-section:hover .edit-btn { opacity: 1; }
.inline-edit { outline: none; cursor: text; }
.builder-mode .inline-edit:hover { background: rgba(108,92,231,0.08); border-radius: 4px; }
.preview-mode .edit-btn, .preview-mode .item-controls, .preview-mode .add-item-btn { display: none !important; }
.preview-mode .editable-section::before { display: none !important; }
.editable-item { position: relative; }
.item-controls { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; opacity: 0; z-index: 45; }
.builder-mode .editable-item:hover .item-controls { opacity: 1; }
.builder-mode .office-banner-slider:hover .item-controls { opacity: 1; }
.item-controls button { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; font-size: 12px; }
.item-controls .ctrl-del { background: #fee2e2; color: #dc2626 !important; }
.item-controls .ctrl-del:hover { background: #dc2626; color: #fff !important; }
.ctrl-del i { color: inherit !important; }
.add-item-btn { border: 2px dashed #cbd5e1; background: #f8fafc; border-radius: 10px; padding: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; color: #64748b; font-weight: 500; cursor: pointer; font-family: "Mitr", sans-serif; font-size: 13px; transition: all 0.2s; width: 100%; margin-top: 12px; }
.add-item-btn:hover { border-color: #6c5ce7; background: #f3f0ff; color: #6c5ce7; }

/* Upload overlay */
.upload-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; opacity: 0; transition: opacity 0.3s; cursor: pointer; z-index: 41; border-radius: inherit; }
.builder-mode .upload-overlay:hover { opacity: 1; }
.upload-overlay i { font-size: 24px; color: #fff; }
.upload-overlay span { color: #fff; font-size: 13px; }

/* ============ Navbar ============ */
.navbar-onepage { background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%); padding: 14px 0; box-shadow: 0 2px 20px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(80,191,218,0.1); }
.navbar-onepage .container { display: flex; justify-content: space-between; align-items: center; }
.navbar-brand-text { text-decoration: none; font-size: 18px; font-weight: 700; color: #212529; display: flex; align-items: center; gap: 10px; transition: color 0.2s; }
.navbar-brand-text:hover { opacity: 0.85; }
.navbar-brand-text i#navBrandIcon { font-size: 16px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; flex-shrink: 0; transition: all 0.2s; }
.navbar-right { display: flex; align-items: center; gap: 8px; }
.navbar-contact-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; background: #50bfda; color: #fff; border-radius: 50px; text-decoration: none; font-size: 14px; font-weight: 600; transition: all 0.3s; box-shadow: 0 4px 15px rgba(80,191,218,0.3); letter-spacing: 0.3px; }
.navbar-contact-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(80,191,218,0.4); filter: brightness(1.05); color: #fff; }
.navbar-edit-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #e9ecef; background: #fff; color: #6c757d; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: all 0.2s; }
.navbar-edit-btn:hover { background: #f0f9ff; color: #50bfda; border-color: #50bfda; }
.preview-mode .navbar-edit-btn { display: none; }

/* ============ Builder Overrides for Office Content ============ */
/* Override: builder needs overflow visible for logo overlay */
.office-header-card { overflow: visible; }

/* Override: tab content in builder (no separate card box) */
.office-tab-content { background: #fff; border-radius: 0 0 12px 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); border: 1px solid #e9ecef; border-top: none; padding: 25px; }

/* Footer */
.onepage-footer { background: #212529; color: #adb5bd; padding: 25px 0; text-align: center; font-size: 14px; }
.onepage-footer .navbar-edit-btn { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.2); color: #fff; }
.onepage-footer .navbar-edit-btn:hover { background: rgba(255,255,255,0.3); }
.preview-mode .onepage-footer .navbar-edit-btn { display: none; }

/* ============ Modal (Builder Only) ============ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000; display: none; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal-content { background: #fff; border-radius: 16px; padding: 24px; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; }
.modal-content h3 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.modal-field { margin-bottom: 14px; }
.modal-field label { display: block; font-size: 13px; font-weight: 500; color: #495057; margin-bottom: 6px; }
.modal-field input, .modal-field select, .modal-field textarea { width: 100%; padding: 10px 14px; border: 1px solid #e9ecef; border-radius: 8px; font-size: 14px; font-family: "Mitr", sans-serif; }
.modal-field input:focus, .modal-field textarea:focus { outline: none; border-color: #6c5ce7; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 10px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: "Mitr", sans-serif; border: none; }
.modal-btn-cancel { background: #f1f3f5; color: #495057; }
.modal-btn-cancel:hover { background: #e9ecef; }
.modal-btn-confirm { background: #6c5ce7; color: #fff; }
.modal-btn-confirm:hover { background: #5a4bd1; }

/* Icon Picker */
.icon-picker-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-height: 180px; overflow-y: auto; padding: 8px; background: #f8f9fa; border-radius: 8px; margin-top: 6px; }
.icon-picker-item { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; background: #fff; border: 1px solid #e9ecef; font-size: 16px; transition: all 0.2s; }
.icon-picker-item:hover { background: #f3f0ff; border-color: #6c5ce7; }
.icon-picker-item.selected { background: #6c5ce7; color: #fff; border-color: #6c5ce7; }

/* ============ Responsive ============ */
@media (max-width: 991px) {
    .col-lg-8, .col-lg-4 { width: 100%; }
    .office-header-info { flex-direction: column; }
}
@media (max-width: 767px) {
    .col-md-6 { width: 100%; }
    .builder-toolbar { padding: 8px 12px; gap: 8px; }
    .tb-btn span { display: none; }
}

/* ============ Sidebar alignment fix for builder ============ */
.contact-sidebar {
    position: static;
    top: auto;
}
