/**
 * YOOAdmin - Data cleanup modal styles
 *
 * @package YOOAdmin
 */

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

/* Overlay */
.yp-cleanup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

/* Dialog Box */
.yp-cleanup-dialog {
    position: relative;
    width: 90%;
    max-width: 560px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: yp-cleanup-slide-in 0.2s ease-out;
}

@keyframes yp-cleanup-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.yp-cleanup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: linear-gradient(to bottom, #fafafa, #fff);
}

.yp-cleanup-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.yp-cleanup-close {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #666;
}

.yp-cleanup-close:hover {
    background: #f0f0f0;
    color: #d63638;
}

.yp-cleanup-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Content */
.yp-cleanup-content {
    padding: 24px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Warning Box */
.yp-cleanup-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin-bottom: 20px;
}

.yp-cleanup-warning .dashicons {
    color: #ffc107;
    font-size: 24px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.yp-cleanup-warning p {
    margin: 0;
    color: #664d03;
    font-size: 14px;
    line-height: 1.6;
}

/* List */
.yp-cleanup-list {
    margin-bottom: 20px;
}

.yp-cleanup-list p {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.yp-cleanup-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.yp-cleanup-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
}

.yp-cleanup-list li .dashicons {
    color: #d63638;
    font-size: 18px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Safe Box */
.yp-cleanup-safe {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #d1e7dd;
    border: 1px solid #16a34a;
    border-radius: 8px;
    margin-bottom: 20px;
}

.yp-cleanup-safe .dashicons {
    color: #16a34a;
    font-size: 24px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.yp-cleanup-safe p {
    margin: 0;
    color: #0f5132;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

/* Confirmation Input */
.yp-cleanup-confirm {
    margin-bottom: 0;
}

.yp-cleanup-confirm label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.yp-cleanup-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-transform: uppercase;
}

.yp-cleanup-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Footer */
.yp-cleanup-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
}

.yp-cleanup-cancel {
    padding: 0 16px !important;
    border-radius: 6px !important;
}

.yp-cleanup-delete {
    padding: 0px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    background: #d63638 !important;
    border-color: #d63638 !important;
    color: #fff !important;
    transition: all 0.2s ease !important;
}

.yp-cleanup-delete:hover:not(:disabled) {
    background: #b32d2e !important;
    border-color: #b32d2e !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(214, 54, 56, 0.3) !important;
}

.yp-cleanup-delete:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.yp-cleanup-delete {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.yp-cleanup-delete .dashicons {
    margin-right: 0;
    vertical-align: middle;
}

.yp-cleanup-delete .dashicons.spin {
    animation: yp-cleanup-spin 1s linear infinite;
}

@keyframes yp-cleanup-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Notification */
.yp-cleanup-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999999;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.yp-cleanup-notification-visible {
    transform: translateY(0);
    opacity: 1;
}

.yp-cleanup-notification-success {
    border-left: 4px solid #16a34a;
}

.yp-cleanup-notification-error {
    border-left: 4px solid #d63638;
}

.yp-cleanup-notification .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.yp-cleanup-notification-success .dashicons {
    color: #16a34a;
}

.yp-cleanup-notification-error .dashicons {
    color: #d63638;
}

.yp-cleanup-notification span:last-child {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

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

/* Responsive */
@media (max-width: 600px) {
    .yp-cleanup-dialog {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .yp-cleanup-header,
    .yp-cleanup-content,
    .yp-cleanup-footer {
        padding: 16px;
    }
    
    .yp-cleanup-notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}

/* Toggle Slider Styles */
.yp-cleanup-toggle-wrapper {
    margin: 24px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.yp-cleanup-toggle-wrapper .yp-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
}

.yp-cleanup-toggle-wrapper .yp-toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-left: 16px;
}

.yp-cleanup-toggle-wrapper .yp-toggle-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}

.yp-cleanup-toggle-wrapper .yp-toggle-slider-round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.yp-cleanup-toggle-wrapper .yp-toggle-slider-round:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.yp-cleanup-toggle-wrapper .yp-toggle-checkbox:checked + .yp-toggle-slider-round {
    background-color: var(--yp-brand, var(--yooadmin-primary, #eda934));
}

.yp-cleanup-toggle-wrapper .yp-toggle-checkbox:checked + .yp-toggle-slider-round:before {
    transform: translateX(24px);
}

.yp-cleanup-toggle-wrapper .yp-toggle-checkbox:focus + .yp-toggle-slider-round {
    box-shadow: 0 0 1px var(--yp-brand, var(--yooadmin-primary, #eda934));
}

.yp-cleanup-enable-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

