/**
 * YOOAdmin - Enable focus mode modal styles
 *
 * @package YOOAdmin
 */

/* Modal Base Styles */
.yp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.yp-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    z-index: 1;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.yp-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}

.yp-modal-close:hover {
    background: var(--yp-primary, #eda934);
    transform: rotate(90deg);
}

.yp-modal-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #666;
}

.yp-modal-close:hover .dashicons {
    color: #fff;
}

/* RTL: Move close button to left so it doesn't overlap the icon (same as other modals) */
[dir="rtl"] .yp-modal-close {
    right: auto;
    left: 15px;
}

[dir="rtl"] .yp-modal-header {
    padding-left: 50px;
    padding-right: 25px;
}

.yp-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 25px 25px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.yp-modal-icon {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: var(--yp-primary, #eda934);
    flex-shrink: 0;
}

.yp-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.yp-modal-body {
    padding: 25px;
    max-height: 50vh;
    overflow-y: auto;
}

.yp-modal-text {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: #1a1a1a;
}

.yp-modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid #e5e5e5;
    background: #f8f9fa;
    justify-content: flex-end;
}

/* Modal option hover effect */
.yoo-enable-option {
    transition: all 0.2s ease;
}

.yoo-enable-option:hover {
    border-color: var(--yp-primary, #eda934) !important;
    background: rgba(238, 180, 78, 0.05);
}

.yoo-enable-option input:checked {
    accent-color: var(--yp-primary, #eda934);
}

.yoo-enable-option:has(input:checked) {
    border-color: var(--yp-primary, #eda934) !important;
    background: rgba(238, 180, 78, 0.08);
}

.yp-modal-dismiss-btn:hover {
    background: #f8f9fa !important;
    border-color: #d0d0d0 !important;
}

.yp-modal-action-btn:hover {
    background: #dba617 !important;
}

/* Prevent body scroll when modal is open */
body.yp-modal-open {
    overflow: hidden !important;
}

/* Arabic (RTL): Apply Tajawal font to modal — ensures consistent font with page */
html[dir="rtl"] #yoo-why-focus-modal,
html[dir="rtl"] #yoo-why-focus-modal .yp-modal-content,
html[dir="rtl"] #yoo-why-focus-modal .yp-modal-header,
html[dir="rtl"] #yoo-why-focus-modal .yp-modal-body,
html[dir="rtl"] #yoo-why-focus-modal .yp-modal-footer,
html[dir="rtl"] #yoo-enable-focus-modal,
html[dir="rtl"] #yoo-enable-focus-modal .yp-modal-content,
html[dir="rtl"] #yoo-enable-focus-modal .yp-modal-header,
html[dir="rtl"] #yoo-enable-focus-modal .yp-modal-body,
html[dir="rtl"] #yoo-enable-focus-modal .yp-modal-footer {
    font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
}
