/**
 * SazExpress Installment Widget - Front-end Stylesheet
 */

.saz-installment-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 11px 16px;
    margin: 15px 0;
    box-sizing: border-box;
    font-family: inherit;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
    width: 100%;
    position: relative;
    user-select: none;
}

.saz-installment-box.saz-has-modal {
    cursor: pointer;
}

.saz-installment-box:hover {
    border-color: #cbd5e1;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.saz-inst-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
    flex: 1;
    min-width: 0;
}

.saz-inst-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.55;
    margin: 0;
}

.saz-inst-amount {
    font-weight: 800;
    color: #0f172a;
    display: inline-block;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.saz-inst-amount.saz-updating {
    opacity: 0.3;
    transform: scale(0.96);
}

.saz-inst-subtitle {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}

.saz-inst-logos {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    margin-right: 14px;
    direction: rtl;
}

.saz-inst-logo-badge {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    margin-left: -8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, z-index 0.2s ease, box-shadow 0.2s ease;
}

.saz-inst-logo-badge:hover {
    transform: translateY(-2px) scale(1.12);
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.saz-inst-logo-badge img,
.saz-inst-logo-badge svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================================
 * Installment Education Modal
 * ========================================================= */
.saz-inst-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.saz-inst-modal-backdrop.saz-show {
    opacity: 1;
}

.saz-inst-modal-dialog {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

.saz-inst-modal-backdrop.saz-show .saz-inst-modal-dialog {
    transform: scale(1);
}

.saz-inst-modal-content {
    position: relative;
    padding: 24px 22px;
}

.saz-inst-modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.saz-inst-modal-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.saz-inst-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.saz-inst-modal-icon-badge {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(217, 34, 42, 0.18);
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.saz-inst-modal-icon-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saz-inst-modal-header h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.saz-inst-modal-header p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

/* Timeline */
.saz-inst-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    margin-bottom: 18px;
}

.saz-inst-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #edf2f7;
}

.saz-step-indicator {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 10px;
}

.saz-step-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.saz-step-info strong {
    font-size: 13px;
    color: #1e293b;
}

.saz-step-info span {
    font-size: 11px;
    color: #64748b;
}

.saz-step-price {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    flex-shrink: 0;
}

/* Active Providers Strip in Modal */
.saz-modal-providers-strip {
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.saz-strip-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

.saz-strip-logos {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.saz-strip-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 3px 10px 3px 6px;
}

.saz-strip-badge img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.saz-strip-badge small {
    font-size: 11.5px;
    font-weight: 600;
    color: #1e293b;
}

/* Features list */
.saz-inst-modal-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.saz-inst-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #334155;
}

.saz-inst-feature .dashicons {
    color: #16a34a;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Guide box */
.saz-inst-modal-guide-box {
    background: #eff6ff;
    border-right: 3px solid #3b82f6;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #1e40af;
    line-height: 1.6;
    margin-bottom: 18px;
}

.saz-inst-modal-guide-box p {
    margin: 0;
}

/* Footer Button */
.saz-inst-btn-gotit {
    width: 100%;
    padding: 11px 16px;
    background: #d9222a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.saz-inst-btn-gotit:hover {
    background: #b91c24;
}

/* Responsive */
@media (max-width: 480px) {
    .saz-installment-box {
        padding: 9px 12px;
    }
    .saz-inst-title {
        font-size: 12px;
    }
    .saz-inst-subtitle {
        font-size: 10.5px;
    }
    .saz-inst-logo-badge {
        width: 27px;
        height: 27px;
        min-width: 27px;
        margin-left: -6px;
    }
    .saz-inst-modal-features {
        grid-template-columns: 1fr;
    }
}
