/**
 * Fabiana Arcana Rate - Frontend stylesheet
 * Palette: #845852 tortora · #523D42 vinaccia · #F4F1EC ivory · #E6DFD6 crema scuro
 * Zero border-radius. Corner sharp ovunque.
 * Tipografia: Cormorant Garamond per heading, Josefin Sans per body.
 */

.far-fe-wrap {
    max-width: 780px;
    margin: 40px auto;
    padding: 0 20px;
    color: #1F1C1A;
    font-family: "Josefin Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 300;
}
.far-fe-wrap * {
    box-sizing: border-box;
}
.far-fe-wrap a {
    color: #845852;
    text-decoration: none;
    transition: color 0.15s ease;
}
.far-fe-wrap a:hover {
    color: #523D42;
}

/* -----------------------------------------------------------------
   HEADER
----------------------------------------------------------------- */
.far-fe-header {
    margin-bottom: 40px;
    text-align: center;
}
.far-fe-header h2 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 300;
    font-size: 36px;
    margin: 0;
    color: #1F1C1A;
    line-height: 1.2;
}
.far-fe-eyebrow {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #845852;
    margin: 0 0 8px 0;
    font-weight: 400;
}

/* -----------------------------------------------------------------
   EMPTY / NOTICE
----------------------------------------------------------------- */
.far-fe-notice {
    padding: 40px 32px;
    background: #F4F1EC;
    text-align: center;
    color: #1F1C1A;
}
.far-fe-notice p {
    margin: 0 0 16px 0;
    font-size: 16px;
    line-height: 1.6;
}
.far-fe-notice p:last-child {
    margin-bottom: 0;
}

/* -----------------------------------------------------------------
   PLAN CARD
----------------------------------------------------------------- */
.far-fe-plan {
    background: #fff;
    border: 1px solid #E0D9CE;
    margin-bottom: 28px;
    padding: 28px 32px;
}
.far-fe-plan.is-suspended {
    border-left: 3px solid #B5654A;
}
.far-fe-plan.is-completed {
    opacity: 0.75;
}
.far-fe-plan-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.far-fe-plan-head h3 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 300;
    font-size: 24px;
    margin: 0;
    color: #1F1C1A;
    line-height: 1.2;
}
.far-fe-plan-total {
    text-align: right;
}
.far-fe-plan-total .far-fe-label {
    display: block;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8C8379;
    margin-bottom: 4px;
}
.far-fe-plan-total .far-fe-value {
    display: block;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 22px;
    color: #1F1C1A;
    line-height: 1.1;
}
.far-fe-plan-total .far-fe-meta {
    display: block;
    font-size: 12px;
    color: #8C8379;
    margin-top: 4px;
}

/* -----------------------------------------------------------------
   PROGRESS
----------------------------------------------------------------- */
.far-fe-progress-wrap {
    margin-bottom: 20px;
}
.far-fe-progress {
    background: #E6DFD6;
    height: 4px;
    overflow: hidden;
}
.far-fe-progress-bar {
    background: #845852;
    height: 100%;
    transition: width 0.5s ease;
}
.far-fe-progress-label {
    margin-top: 10px;
    font-size: 13px;
    color: #8C8379;
}

/* -----------------------------------------------------------------
   BANNER (suspended)
----------------------------------------------------------------- */
.far-fe-banner {
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}
.far-fe-banner.is-warning {
    background: #F5DCCE;
    color: #7A3F25;
    border-left: 3px solid #B5654A;
}
.far-fe-banner a {
    color: #7A3F25;
    text-decoration: underline;
}

/* -----------------------------------------------------------------
   NEXT INSTALLMENT
----------------------------------------------------------------- */
.far-fe-next {
    background: #F4F1EC;
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.far-fe-next.is-due {
    background: #F5DCCE;
}
.far-fe-next .far-fe-eyebrow {
    margin-bottom: 6px;
}
.far-fe-next-info {
    margin: 0;
    font-size: 16px;
    color: #1F1C1A;
    font-weight: 400;
}
.far-fe-next-hint {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #8C8379;
    font-style: italic;
}
.far-fe-next.is-due .far-fe-next-hint {
    color: #7A3F25;
    font-style: normal;
    font-weight: 500;
}

/* -----------------------------------------------------------------
   BUTTONS
----------------------------------------------------------------- */
.far-fe-button {
    display: inline-block;
    padding: 12px 28px;
    background: #F4F1EC;
    color: #523D42 !important;
    border: 1px solid #523D42;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: "Josefin Sans", sans-serif;
    font-weight: 400;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
}
.far-fe-button:hover {
    background: #523D42;
    color: #F4F1EC !important;
}
.far-fe-button.is-primary {
    background: #523D42;
    color: #F4F1EC !important;
    border-color: #523D42;
}
.far-fe-button.is-primary:hover {
    background: #845852;
    border-color: #845852;
    color: #F4F1EC !important;
}

/* -----------------------------------------------------------------
   DETAILS / TABLE
----------------------------------------------------------------- */
.far-fe-details {
    margin-top: 16px;
    border-top: 1px solid #E0D9CE;
    padding-top: 16px;
}
.far-fe-details summary {
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #845852;
    padding: 4px 0;
    user-select: none;
}
.far-fe-details summary:hover {
    color: #523D42;
}
.far-fe-details[open] summary {
    margin-bottom: 12px;
}

.far-fe-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
}
.far-fe-table th,
.far-fe-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #E0D9CE;
}
.far-fe-table th {
    background: #F4F1EC;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #8C8379;
    font-weight: 400;
}
.far-fe-table tbody tr.is-paid {
    color: #8C8379;
}
.far-fe-table tbody tr.is-overdue {
    background: #FDF4F0;
}

.far-fe-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
}
.far-fe-badge.is-pending {
    background: #E6DFD6;
    color: #523D42;
}
.far-fe-badge.is-paid {
    background: #E5EEDC;
    color: #4A5541;
}
.far-fe-badge.is-overdue,
.far-fe-badge.is-failed {
    background: #F5DCCE;
    color: #7A3F25;
}
.far-fe-meta {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    color: #8C8379;
    font-style: italic;
}

.far-fe-link {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #845852 !important;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
}
.far-fe-link:hover {
    color: #523D42 !important;
}

/* -----------------------------------------------------------------
   FOOTER
----------------------------------------------------------------- */
.far-fe-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #E0D9CE;
    text-align: center;
    font-size: 13px;
    color: #8C8379;
}
.far-fe-footer p {
    margin: 0;
}

/* -----------------------------------------------------------------
   RESPONSIVE
----------------------------------------------------------------- */
@media (max-width: 600px) {
    .far-fe-plan {
        padding: 20px;
    }
    .far-fe-plan-head {
        flex-direction: column;
        gap: 16px;
    }
    .far-fe-plan-total {
        text-align: left;
    }
    .far-fe-next {
        flex-direction: column;
        align-items: flex-start;
    }
    .far-fe-button {
        width: 100%;
        text-align: center;
    }
    .far-fe-table {
        font-size: 12px;
    }
    .far-fe-table th,
    .far-fe-table td {
        padding: 8px 6px;
    }
}
