/* ==============================
   CUSTOM RAW UTILITY CSS
   Replacing Bootstrap completely
   ============================== */
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.flex-grow { flex-grow: 1; min-width: 10px; }

/* Spacing */
.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.margin-right-sm { margin-right: 0.5rem; }
.margin-right-md { margin-right: 1rem; }
.margin-bottom-sm { margin-bottom: 0.5rem; }
.margin-bottom-md { margin-bottom: 1rem; }
.margin-top-xs { margin-top: 0.25rem; }
.padding-bottom-sm { padding-bottom: 0.5rem; }
.p-0 { padding: 0; }
.p-sm { padding: 0.5rem; }
.p-md { padding: 1rem; }
.py-md { padding-top: 1rem; padding-bottom: 1rem; }
.p-lg { padding: 1.5rem; }
.border-bottom { border-bottom: 1px solid #e2e8f0; }
.border-bottom-light { border-bottom: 1px solid #f1f5f9; }
.border-start { border-left: 2px solid #e2e8f0; }
.border-0 { border: 0 !important; }

/* Tyopgraphy & Colors */
.fw-bold { font-weight: 600; }
.text-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-muted { color: #64748b; }
.text-danger { color: #ef4444; }
.text-primary-color { color: #2563eb; }
.text-secondary-color { color: #475569; }
.text-success-color { color: #16a34a; }
.fst-italic { font-style: italic; }
.text-center { text-align: center; }
.d-block { display: block; }
.font-sm { font-size: 0.85rem; }
.font-large { font-size: 1.25rem; }
.font-xlarge { font-size: 2rem; }

/* Components */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid transparent;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background-color: #2563eb; color: white; border-color: #2563eb; }
.btn-primary:not(:disabled):hover { background-color: #1d4ed8; }
.btn-outline { border-color: #e2e8f0; color: #334155; }
.btn-outline:hover { background-color: #f1f5f9; }
.btn-danger { background-color: #fca5a5; color: #991b1b; }
.btn-danger:hover { background-color: #f87171; color: white; }
.btn-success { background-color: #16a34a; color: white; }
.btn-success:hover { background-color: #15803d; }
.btn-shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.btn-large { padding: 0.75rem 2rem; font-size: 1.1rem; border-radius: 99px; }

/* Icon buttons (Eye, Trash) */
.btn-icon {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-icon-muted { color: #64748b; border-color: #e2e8f0; }
.btn-icon-muted:hover { background-color: #f1f5f9; }
.btn-icon-success { color: #16a34a; border-color: #16a34a; background-color: #f0fdf4; }
.btn-icon-success:hover { background-color: #dcfce7; }
.btn-icon-danger { color: #ef4444; border-color: transparent; }
.btn-icon-danger:hover { background-color: #fef2f2; border-color: #fca5a5; }

/* Custom Inputs */
.custom-input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.custom-input {
    flex: 1;
    border: none;
    padding: 0.25rem 0.5rem;
    outline: none;
    font-size: 0.9rem;
    min-width: 50px;
}
.custom-input-suffix {
    background-color: #f1f5f9;
    color: #64748b;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    border-left: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
}

/* Custom Cards */
.custom-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.custom-card-header { font-weight: 600; font-size: 1rem; }

/* Tags */
.tag-secondary { background: #64748b; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.tag-info { background: #3b82f6; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.tag-danger { background: #ef4444; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.tag-warning { background: #eab308; color: black; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }

/* Simple Spinner */
.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid currentColor;
    width: 14px;
    height: 14px;
    animation: spin 1s linear infinite;
    display: inline-block;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Grid for Editor */
.editor-grid {
    display: flex;
    gap: 1.5rem;
}
.editor-panel-main { flex: 2; }
.editor-panel-side { flex: 1; }
@media (max-width: 768px) {
    .editor-grid { flex-direction: column; }
}

/* Modal Overlay */
.custom-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    backdrop-filter: blur(2px);
}

.custom-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1050;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    animation: modalPop 0.2s ease-out forwards;
}

.custom-modal-header {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.custom-modal-body {
    padding: 1.5rem 1rem;
}

.custom-modal-footer {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

@keyframes modalPop {
    from { transform: translate(-50%, -45%); opacity: 0; }
    to { transform: translate(-50%, -50%); opacity: 1; }
}
