/**
 * Flow Subscription - Cancel Modal Styles
 */

/* Modal overlay and container */
.fsubs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

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

.fsubs-modal-content {
    position: relative;
    max-width: 540px;
    margin: 60px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fsubs-modal-slide-in 0.3s ease-out;
    z-index: 1;
}

@keyframes fsubs-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal header */
.fsubs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.fsubs-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #dc3232;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fsubs-modal-header .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.fsubs-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    color: #666;
    transition: color 0.2s;
}

.fsubs-modal-close:hover {
    color: #dc3232;
}

.fsubs-modal-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Modal body */
.fsubs-modal-body {
    padding: 25px;
}

.fsubs-modal-body > p:first-child {
    margin-top: 0;
    font-size: 16px;
}

.fsubs-plan-info {
    margin: 15px 0;
    padding: 12px;
    background: #f0f0f1;
    border-radius: 4px;
    font-size: 14px;
}

.fsubs-plan-info code {
    background: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
    color: #2271b1;
}

/* Warning box */
.fsubs-warning-box {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    margin: 20px 0;
}

.fsubs-warning-box .dashicons {
    flex-shrink: 0;
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #856404;
}

.fsubs-warning-box p {
    margin: 0 0 8px 0;
}

.fsubs-warning-box p:last-child {
    margin-bottom: 0;
}

.fsubs-warning-box ul {
    margin: 0;
    padding-left: 20px;
}

.fsubs-warning-box li {
    margin: 5px 0;
    font-size: 14px;
    color: #856404;
}

/* Checkbox */
.fsubs-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.fsubs-checkbox-wrapper:hover {
    background: #e9ecef;
}

.fsubs-checkbox-wrapper input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.fsubs-checkbox-wrapper span {
    font-size: 14px;
    font-weight: 500;
}

/* Modal footer */
.fsubs-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px 25px;
    border-top: 1px solid #e5e5e5;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.fsubs-modal-footer .button {
    margin: 0;
    padding: 8px 16px;
    font-size: 14px;
}

.button-danger {
    background: #dc3232;
    color: #fff;
    border-color: #dc3232;
}

.button-danger:hover:not(:disabled) {
    background: #c22626;
    border-color: #c22626;
}

.button-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button-danger .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 5px;
}

/* Body class when modal is open */
body.fsubs-modal-open {
    overflow: hidden;
}

/* Cancel section in detail page */
.fsubs-cancel-section {
    border-radius: 6px;
}

.fsubs-cancel-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fsubs-cancel-section .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.fsubs-cancel-detail-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.fsubs-canceled-notice {
    border-radius: 6px;
}

.fsubs-canceled-notice p {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .fsubs-modal-content {
        margin: 20px;
        max-width: none;
    }

    .fsubs-modal-header,
    .fsubs-modal-body,
    .fsubs-modal-footer {
        padding: 15px;
    }

    .fsubs-modal-header h3 {
        font-size: 16px;
    }

    .fsubs-modal-footer {
        flex-direction: column-reverse;
    }

    .fsubs-modal-footer .button {
        width: 100%;
        text-align: center;
    }

    .fsubs-warning-box {
        flex-direction: column;
        gap: 8px;
    }
}

/* Loading spinner */
.fsubs-modal-confirm .spinner {
    background: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 50 50"><circle cx="25" cy="25" r="20" fill="none" stroke="%23fff" stroke-width="4" stroke-linecap="round"><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" from="0 125.6" to="125.6 0"/><animateTransform attributeName="transform" type="rotate" dur="1.5s" repeatCount="indefinite" from="0 25 25" to="360 25 25"/></circle></svg>') no-repeat center;
    background-size: 20px 20px;
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
}
