/* /dev/assets/css/dialog.css */
/* VERSION 7.0 - PROMINENT CLOSE BUTTON & FINAL THEME POLISH */

.custom-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    visibility: hidden;
    padding: 16px;
}

.custom-dialog-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* DEFINITIVE FIX: New wrapper to contain the content and the external close button */
.custom-dialog-wrapper {
    position: relative;
}

.custom-dialog-content {
    background-color: #ffffff;
    border-radius: 8px; /* Matching view.php cards */
    width: 100%;
    max-width: 560px; /* Wider to accommodate the new layout */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.2s ease-in-out;
    padding: 24px; /* Unified padding */
}

.custom-dialog-overlay.visible .custom-dialog-content {
    transform: scale(1);
    opacity: 1;
}

.custom-dialog-main {
    display: flex;
    align-items: center;
    gap: 24px;
}

.custom-dialog-text-content {
    flex-grow: 1;
}

.custom-dialog-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.5;
}

.custom-dialog-body {
    font-size: 15px;
    color: #334155;
    line-height: 1.6;
}

.custom-dialog-body p {
    margin: 0;
}

/* DEFINITIVE FIX: Prominent, external close button */
.custom-dialog-close {
position: absolute;
    top: -42px;
    right: -80px;
    background: #ffffff;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 36px;
    height: 36px;
    font-size: 20px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s 
ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-dialog-close:hover {
    transform: scale(1.1);
    color: #1e293b;
}

.custom-dialog-body .sf-input {
    width: 100%;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 12px;
    font-size: 14px;
    color: #111827;
}

.custom-dialog-body .sf-input:focus {
    outline: none;
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.3);
}

.custom-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0; /* Prevent buttons from shrinking */
}

.sf-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap; /* Prevent button text from wrapping */
}

.sf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Primary Button (Purple Gradient) */
.sf-btn-primary {
    background: linear-gradient(180deg, #25091d 0%, #3d0649 100%);
    color: #ffffff;
    border: none;
}

.sf-btn-primary:hover:not(:disabled) {
    opacity: 0.9;
}

/* DEFINITIVE FIX: Secondary/Cancel button updated to yellow */
.sf-btn-secondary {
 background: #ffc107 !important;
    color: #1e293b !important;
    border: none;
}

.sf-btn-secondary:hover:not(:disabled) {
    background-color: #e0a800;
}

/* Danger Button */
.sf-btn-danger {
    background: #dc3545 !important;
    color: #fff !important;
    border-color: #dc3545 !important;
}

.sf-btn-danger:hover:not(:disabled) {
    background: #c82333 !important;
    border-color: #bd2130 !important;
    opacity: 1;
}