/**
 * LearnDash Course Reset - Styles
 */

/* Reset Button */
.ld-course-reset-container,
.ld-course-complete-container {
    display: inline-block;
    margin: 10px 5px;
}

.ld-course-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-decoration: none;
    outline: none;
}

.ld-course-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.ld-course-reset-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.ld-reset-icon {
    font-size: 20px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.ld-course-reset-btn:hover .ld-reset-icon {
    transform: rotate(180deg);
}

.ld-reset-text {
    font-size: 15px;
    letter-spacing: 0.3px;
}

/* Complete Button (Admin Only) */
.ld-course-complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    text-decoration: none;
    outline: none;
}

.ld-course-complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

.ld-course-complete-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.ld-complete-icon {
    font-size: 20px;
    display: inline-block;
    transition: transform 0.3s ease;
    font-weight: bold;
}

.ld-course-complete-btn:hover .ld-complete-icon {
    transform: scale(1.2);
}

.ld-complete-text {
    font-size: 15px;
    letter-spacing: 0.3px;
}

/* Complete Modal Styling */
.ld-complete-icon-large {
    color: #28a745 !important;
    animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { transform: scale(1); color: #28a745; }
    50% { transform: scale(1.1); color: #20c997; }
}

.ld-complete-list {
    background: #d4edda !important;
    border-left-color: #28a745 !important;
}

.ld-complete-bullet {
    color: #28a745 !important;
}

.ld-complete-confirm-box {
    background: #d1ecf1 !important;
    border-color: #17a2b8 !important;
}

.ld-complete-confirm-box .ld-reset-confirm-text {
    color: #0c5460 !important;
}

.ld-complete-btn-confirm {
    background: #28a745 !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3) !important;
}

.ld-complete-btn-confirm:hover {
    background: #218838 !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4) !important;
}

/* Modal Overlay */
.ld-reset-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.ld-reset-modal-overlay.active {
    opacity: 1;
}

.ld-reset-modal-overlay.active .ld-reset-modal {
    transform: scale(1);
    opacity: 1;
}

/* Modal Container */
.ld-reset-modal {
    background: #ffffff;
    border-radius: 16px;
    max-width: 560px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

/* Modal Header */
.ld-reset-modal-header {
    padding: 24px 30px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
    text-align: center;
}

.ld-reset-warning-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.ld-reset-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
    font-weight: 700;
}

.ld-reset-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    transition: color 0.2s ease;
}

.ld-reset-modal-close:hover {
    color: #e74c3c;
}

/* Modal Body */
.ld-reset-modal-body {
    padding: 30px;
}

.ld-reset-warning-intro {
    font-size: 16px;
    color: #555;
    margin: 0 0 20px 0;
    font-weight: 500;
}

.ld-reset-warning-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    background: #fff5f5;
    border-left: 4px solid #e74c3c;
    padding: 20px 25px;
    border-radius: 8px;
}

.ld-reset-warning-list li {
    padding: 10px 0;
    color: #333;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ld-warning-bullet {
    color: #e74c3c;
    font-weight: bold;
    font-size: 18px;
}

.ld-reset-confirm-box {
    background: #fef9e7;
    border: 2px solid #f39c12;
    border-radius: 8px;
    padding: 18px;
    margin-top: 20px;
}

.ld-reset-confirm-text {
    margin: 0;
    color: #856404;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
}

/* Modal Footer */
.ld-reset-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fafafa;
    border-radius: 0 0 16px 16px;
}

.ld-reset-btn-cancel,
.ld-reset-btn-confirm {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.ld-reset-btn-cancel {
    background: #ffffff;
    color: #666;
    border: 2px solid #ddd;
}

.ld-reset-btn-cancel:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.ld-reset-btn-confirm {
    background: #e74c3c;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.ld-reset-btn-confirm:hover {
    background: #c0392b;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.ld-reset-btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading Spinner */
.ld-reset-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.ld-reset-message {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    font-weight: 500;
}

.ld-reset-success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.ld-success-icon {
    font-size: 32px;
    color: #28a745;
    font-weight: bold;
}

.ld-reset-error {
    background: #f8d7da;
    border: 2px solid #e74c3c;
    color: #721c24;
}

.ld-error-icon {
    font-size: 32px;
    color: #e74c3c;
    font-weight: bold;
}

.ld-reset-message p {
    margin: 0;
    flex: 1;
}

/* Responsive Design */
@media screen and (max-width: 600px) {
    .ld-reset-modal {
        width: 95%;
        margin: 20px;
    }

    .ld-reset-modal-header,
    .ld-reset-modal-body,
    .ld-reset-modal-footer {
        padding: 20px;
    }

    .ld-reset-modal-header h2 {
        font-size: 20px;
    }

    .ld-reset-modal-footer {
        flex-direction: column;
    }

    .ld-reset-btn-cancel,
    .ld-reset-btn-confirm {
        width: 100%;
    }

    .ld-course-reset-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .ld-reset-text {
        font-size: 14px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .ld-reset-modal {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    .ld-reset-modal-header {
        border-bottom-color: #333;
    }

    .ld-reset-modal-header h2 {
        color: #e0e0e0;
    }

    .ld-reset-warning-intro,
    .ld-reset-warning-list li {
        color: #d0d0d0;
    }

    .ld-reset-modal-footer {
        background: #252525;
        border-top-color: #333;
    }

    .ld-reset-btn-cancel {
        background: #333;
        color: #e0e0e0;
        border-color: #555;
    }

    .ld-reset-btn-cancel:hover {
        background: #444;
    }
}

/* Integration with LearnDash styles */
.learndash .ld-course-reset-container {
    margin-left: 10px;
}

.ld-course-status-action .ld-course-reset-container {
    display: inline-block;
}
