/**
 * AFOP Frontend Modern Modal & Toast Styles
 */

.afop-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s;
}

.afop-modal-overlay.afop-show {
    opacity: 1;
    visibility: visible;
    display: flex !important;
}

.afop-modal-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 440px;
    padding: 28px 24px;
    text-align: center;
    position: relative;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

.afop-modal-overlay.afop-show .afop-modal-card {
    transform: scale(1) translateY(0);
}

.afop-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.afop-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.afop-modal-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    animation: afop-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes afop-bounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

.afop-icon-warning {
    background: #fef3c7;
    color: #d97706;
}

.afop-icon-danger {
    background: #fee2e2;
    color: #dc2626;
}

.afop-icon-info {
    background: #e0f2fe;
    color: #0284c7;
}

.afop-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px;
    line-height: 1.3;
}

.afop-modal-desc {
    font-size: 14.5px;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 22px;
}

.afop-modal-extra {
    margin-bottom: 18px;
}

.afop-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.afop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.afop-btn-primary {
    background: #2563eb;
    color: #ffffff !important;
}

.afop-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.afop-btn-whatsapp {
    background: #25D366;
    color: #ffffff !important;
}

.afop-btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.afop-btn-cancel {
    background: #f1f5f9;
    color: #475569 !important;
}

.afop-btn-cancel:hover {
    background: #e2e8f0;
    color: #1e293b !important;
}

/* Repeat Actions Inline layout */
.afop-repeat-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 480px) {
    .afop-modal-card {
        padding: 22px 16px;
    }
    .afop-repeat-actions {
        grid-template-columns: 1fr;
    }
}
