.cancel-modal-backdrop {
    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: 10000; /* Very high to ensure it's on top */
    backdrop-filter: blur(5px);
    animation: cancelFadeIn 0.3s ease;
    padding: 1rem;
}

.cancel-modal-box {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: cancelSlideUp 0.4s ease;
    margin: auto;
    position: relative; /* Important for absolute positioning of close button */
}

.cancel-modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.cancel-modal-title {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    padding-right: 1rem;
}

.cancel-modal-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: -0.25rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cancel-modal-close-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.cancel-modal-body {
    padding: 1rem 2rem 1.5rem;
    text-align: center;
}

.cancel-warning-icon {
    font-size: 2.2rem;
    color: #ffc107;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.cancel-modal-subtitle {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    margin-top: 0;
}

.cancel-modal-text {
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    margin-top: 0;
}

.cancel-details-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.cancel-detail-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.6rem;
    color: #495057;
    line-height: 1.3;
    font-size: 0.85rem;
}

.cancel-detail-item:last-child {
    margin-bottom: 0;
}

.cancel-detail-item i {
    width: 16px;
    margin-right: 0.6rem;
    color: #28a745;
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 0.8rem;
}

.cancel-what-happens-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 1rem;
    text-align: left;
}

.cancel-what-happens-title {
    color: #856404;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    line-height: 1.3;
    margin-top: 0;
}

.cancel-what-happens-list {
    margin: 0;
    padding-left: 1rem;
    color: #856404;
}

.cancel-what-happens-list li {
    margin-bottom: 0.3rem;
    line-height: 1.3;
    font-size: 0.8rem;
}

.cancel-what-happens-list li:last-child {
    margin-bottom: 0;
}

.cancel-modal-actions {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cancel-btn-keep,
.cancel-btn-confirm {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
    min-width: 130px;
    font-size: 0.85rem;
    line-height: 1;
}

.cancel-btn-keep {
    background: linear-gradient(135deg, #ff69b4, #ff45a0);
    color: white;
}

.cancel-btn-keep:hover {
    background: linear-gradient(135deg, #ff45a0, #e8398f);
    transform: translateY(-1px);
}

.cancel-btn-confirm {
    background: white;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.cancel-btn-confirm:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #495057;
    transform: translateY(-1px);
}

/* Animations */
@keyframes cancelFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cancelSlideUp {
    from { 
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .cancel-modal-backdrop {
        padding: 0.5rem;
    }
    
    .cancel-modal-box {
        margin: 0;
        width: 100%;
        max-width: none;
    }
    
    .cancel-modal-header,
    .cancel-modal-body,
    .cancel-modal-actions {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .cancel-modal-title {
        font-size: 1.2rem;
        padding-right: 0.5rem;
    }
    
    .cancel-modal-actions {
        flex-direction: column;
    }
    
    .cancel-btn-keep,
    .cancel-btn-confirm {
        min-width: auto;
        width: 100%;
    }
    
    .cancel-detail-item,
    .cancel-what-happens-list li {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .cancel-modal-backdrop {
        padding: 0.25rem;
    }
    
    .cancel-modal-header,
    .cancel-modal-body,
    .cancel-modal-actions {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .cancel-modal-title {
        font-size: 1.1rem;
    }
}