/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed !important;
    top: 24px !important;
    right: 24px !important;
    z-index: 10000 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast-item {
    min-width: 320px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .12);
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(120%);
    transition: all .4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 5px solid #0ea5e9;
}

.toast-item.show {
    transform: translateX(0)
}

.toast-item.error {
    border-left-color: #ef4444
}

.toast-item.success {
    border-left-color: #10b981
}

.toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.toast-item.error .toast-icon {
    background: #fef2f2;
    color: #ef4444
}

.toast-item.success .toast-icon {
    background: #f0fdf4;
    color: #10b981
}

.toast-content {
    flex: 1
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 2px
}

.toast-msg {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4
}

.toast-close {
    cursor: pointer;
    color: #94a3b8;
    transition: color .2s
}

.toast-close:hover {
    color: #64748b
}

/* Form Validation States */
.input-wrap.has-success input {
    border-color: #10b981 !important;
    background: #f0fdf4 !important;
}

.input-wrap.has-error input {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

/* ===== GLOBAL PAGE LOADER ===== */
#globalPageLoader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 20000;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid #0ea5e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
}

.loader-text {
    font-weight: 600;
    letter-spacing: 0.5px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Hide standard Laravel validation error blocks globally as per request */
/* This ensures all post-validation errors are shown via Toast instead of inline text */
.field-error:not(.js-field-error), 
.alert-block.alert-danger, 
.invalid-feedback,
.alert-danger {
    display: none !important;
}

/* ===== CKEDITOR PREMIUM STYLING & FIXES ===== */
.ck-editor__editable {
    min-height: 200px !important;
    max-height: 500px !important;
    background: #fff !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    padding: 0 15px !important;
}

.ck.ck-editor {
    position: relative !important;
    z-index: 1 !important; /* Ensure it stays below dropdowns but above background */
    margin-top: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.ck.ck-toolbar {
    background: #f8fafc !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #cbd5e1 !important;
    padding: 5px !important;
}

.ck.ck-editor__main>.ck-editor__editable {
    border: 1px solid #e2e8f0 !important;
    border-top: none !important;
    transition: all 0.3s ease !important;
}

.ck.ck-editor__main>.ck-editor__editable.ck-focused {
    border-color: #008890 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 136, 144, 0.1), 0 4px 6px -2px rgba(0, 136, 144, 0.05) !important;
}

/* Premium Toolbar Buttons */
.ck.ck-toolbar .ck-button {
    border-radius: 8px !important;
    margin: 2px !important;
    transition: all 0.2s ease !important;
}

.ck.ck-toolbar .ck-button:hover {
    background: #e2e8f0 !important;
}

.ck.ck-toolbar .ck-button.ck-on {
    background: #008890 !important;
    color: #fff !important;
}

/* Fix for overlapping labels in some themes */
.form-label, label {
    display: block !important;
    margin-bottom: 10px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    position: relative !important;
    z-index: 5 !important;
    pointer-events: auto !important;
}

/* Hide the default CKEditor accessibility label if it's being rendered visibly */
.ck.ck-editor__editable_inline[aria-label*="Rich Text Editor"],
.ck-label {
    display: none !important;
}

/* Rich Content Display Wrapper */
.ck-content {
    line-height: 1.8;
    color: #334155;
}

.ck-content p {
    margin-bottom: 1rem;
}

.ck-content ul, .ck-content ol {
    padding-left: 2rem;
    margin-bottom: 1rem;
}
