/* Prayer Time Widget v4.0 */

#mmpt-prayer-widget {
    --mmpt-primary: #1B3A2A;
    --mmpt-primary-dark: #0f2618;
    --mmpt-primary-mid: #2D5E3A;
    --mmpt-primary-light: #e0f0e4;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.1);
    color: #333;
    line-height: 1.5;
}

/* ── HEADER ── */
.mmpt-header { background: linear-gradient(160deg, var(--mmpt-primary-dark), var(--mmpt-primary) 60%, var(--mmpt-primary-mid)); color: #fff; padding: 28px 24px 24px; text-align: center; }
.mmpt-header h2 { font-size: 1.15em; font-weight: 700; letter-spacing: .3px; margin-bottom: 2px; color: #fff; }
.mmpt-header .mmpt-addr { font-size: .68em; opacity: .65; font-weight: 400; letter-spacing: .2px; }
.mmpt-np-wrap { margin-top: 20px; display: flex; justify-content: center; align-items: center; }
.mmpt-np-side { flex: 1; text-align: center; padding: 0 8px; max-width: 220px; }
.mmpt-np-label { font-size: .65em; text-transform: uppercase; letter-spacing: 1.5px; opacity: .6; font-weight: 600; margin-bottom: 6px; }
.mmpt-np-time { font-size: 2.2em; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.mmpt-np-time .ampm { font-size: .35em; font-weight: 500; letter-spacing: .5px; margin-left: 3px; vertical-align: super; opacity: .7; }
.mmpt-np-cd { font-size: .8em; color: #d4a944; font-weight: 700; margin-top: 5px; min-height: 1.2em; }
.mmpt-np-divider { width: 1px; height: 60px; background: rgba(255,255,255,.2); flex-shrink: 0; }

/* ── TOGGLE ── */
.mmpt-tog-wrap { display: flex; justify-content: center; padding: 18px 0 6px; }
.mmpt-tog { display: inline-flex; border-radius: 10px; background: #f3f4f6; padding: 3px; }
.mmpt-tog button { padding: 9px 28px; border: none; background: transparent; cursor: pointer; font-size: .85em; font-weight: 600; color: #999; border-radius: 8px; transition: all .2s; font-family: inherit; }
.mmpt-tog button.active { background: var(--mmpt-primary); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }

/* ── DAILY VIEW ── */
.mmpt-daily { padding: 6px 20px 20px; max-width: 500px; margin: 0 auto; }
.mmpt-d-nav { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 0 16px; }
.mmpt-d-nav button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #e5e7eb; background: #fff; cursor: pointer; font-size: 1.1em; color: #999; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.mmpt-d-nav button:hover { background: #f9f9f9; border-color: #ccc; color: #555; }
.mmpt-d-date { font-weight: 700; font-size: .95em; color: #333; }

.mmpt-col-headers { display: flex; align-items: center; padding: 0 16px 6px; border-bottom: 1px solid #f0f0f0; margin-bottom: 4px; }
.mmpt-col-headers span { font-size: .65em; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; color: #bbb; }
.mmpt-col-headers .mmpt-ch-name { flex: 1; }
.mmpt-col-headers .mmpt-ch-begin, .mmpt-col-headers .mmpt-ch-jamat { width: 100px; text-align: center; }

.mmpt-prayer-list { display: flex; flex-direction: column; gap: 2px; }
.mmpt-prayer-row { display: flex; align-items: center; padding: 15px 16px; border-radius: 12px; transition: background .15s; }
.mmpt-prayer-row:hover { background: #f9fafb; }
.mmpt-prayer-row .mmpt-p-name { flex: 1; font-size: 1.15em; font-weight: 700; color: #1a1a1a; }
.mmpt-prayer-row .mmpt-p-begin { width: 100px; text-align: center; font-size: .92em; color: #888; font-weight: 500; }
.mmpt-prayer-row .mmpt-p-begin .ampm { font-size: .75em; color: #aaa; margin-left: 1px; }
.mmpt-prayer-row .mmpt-p-jamat { width: 100px; text-align: center; font-size: .92em; font-weight: 700; color: #333; }
.mmpt-prayer-row .mmpt-p-jamat .ampm { font-size: .75em; color: #888; font-weight: 500; margin-left: 1px; }
.mmpt-prayer-row .mmpt-p-jamat .na-text { font-size: .78em; color: #bbb; font-weight: 500; font-style: italic; }

.mmpt-prayer-row.mmpt-hl { background: var(--mmpt-primary); border-radius: 14px; box-shadow: 0 4px 16px rgba(27,58,42,.35); }
.mmpt-prayer-row.mmpt-hl .mmpt-p-name { color: #fff; }
.mmpt-prayer-row.mmpt-hl .mmpt-p-begin { color: rgba(255,255,255,.6); }
.mmpt-prayer-row.mmpt-hl .mmpt-p-begin .ampm { color: rgba(255,255,255,.4); }
.mmpt-prayer-row.mmpt-hl .mmpt-p-jamat { color: #fff; font-weight: 800; }
.mmpt-prayer-row.mmpt-hl .mmpt-p-jamat .ampm { color: rgba(255,255,255,.5); }

.mmpt-extras { display: flex; justify-content: center; gap: 32px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #f0f0f0; }
.mmpt-extras .mmpt-ex-item { text-align: center; }
.mmpt-extras .mmpt-ex-label { font-size: .65em; text-transform: uppercase; letter-spacing: 1px; color: #bbb; font-weight: 600; margin-bottom: 2px; }
.mmpt-extras .mmpt-ex-val { font-size: .95em; font-weight: 700; color: #333; }
.mmpt-extras .mmpt-ex-val .ampm { font-size: .75em; color: #888; font-weight: 500; margin-left: 1px; }

/* ── MONTHLY VIEW ── */
.mmpt-monthly { padding: 10px 16px 20px; }
.mmpt-m-nav { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 0 16px; }
.mmpt-m-nav button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #e5e7eb; background: #fff; cursor: pointer; font-size: 1.2em; color: #999; display: flex; align-items: center; justify-content: center; }
.mmpt-m-nav button:hover { background: #f9f9f9; color: #555; }
.mmpt-m-nav .mmpt-m-label { font-weight: 700; font-size: 1.05em; color: #333; }

/* Column headers */
.mmpt-m-headers {
    display: grid;
    grid-template-columns: 42px 32px 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 0;
    padding: 0 4px 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 6px;
}
.mmpt-m-headers span {
    text-align: center;
    font-size: .7em;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: #bbb;
}

/* Day rows */
.mmpt-m-row {
    display: grid;
    grid-template-columns: 42px 32px 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 0;
    align-items: center;
    padding: 12px 4px;
    margin: 3px 0;
    border-radius: 12px;
    background: #f9fafb;
    transition: background .15s;
}
.mmpt-m-row:hover { background: #f0f1f3; }

.mmpt-m-row .mmpt-m-day {
    font-size: .82em;
    font-weight: 700;
    color: #aaa;
    text-align: center;
}
.mmpt-m-row .mmpt-m-date {
    font-size: 1em;
    font-weight: 800;
    color: #333;
    text-align: center;
}
.mmpt-m-cell {
    text-align: center;
    line-height: 1.3;
}
.mmpt-m-cell .mmpt-m-start {
    font-size: .78em;
    color: #aaa;
    font-weight: 500;
}
.mmpt-m-cell .mmpt-m-jam {
    font-size: .95em;
    font-weight: 800;
    color: #1a1a1a;
}
.mmpt-m-cell .mmpt-m-single {
    font-size: .95em;
    font-weight: 800;
    color: #1a1a1a;
}

/* Today highlight */
.mmpt-m-row.mmpt-today {
    background: var(--mmpt-primary-light);
}
.mmpt-m-row.mmpt-today .mmpt-m-day { color: var(--mmpt-primary); }
.mmpt-m-row.mmpt-today .mmpt-m-start { color: #666; }

/* Friday */
.mmpt-m-row.mmpt-fri {
    background: #f4f9f5;
}
.mmpt-m-row.mmpt-fri .mmpt-m-jam { color: var(--mmpt-primary); }
.mmpt-m-row.mmpt-fri .mmpt-m-day { color: var(--mmpt-primary); }

/* Today + Friday */
.mmpt-m-row.mmpt-today.mmpt-fri {
    background: var(--mmpt-primary-light);
}

/* Footer */
.mmpt-ftr { text-align: center; padding: 14px; font-size: .68em; color: #ccc; font-weight: 500; letter-spacing: .2px; }
.mmpt-loading { text-align: center; padding: 40px; color: #999; font-weight: 500; }
.mmpt-loading::before { content: ''; display: inline-block; width: 16px; height: 16px; border: 2px solid #ddd; border-top-color: var(--mmpt-primary); border-radius: 50%; animation: mmpt-spin .6s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes mmpt-spin { to { transform: rotate(360deg); } }

/* Today button */
.mmpt-today-btn {
    font-family: inherit;
    font-size: .8em;
    font-weight: 600;
    padding: 8px 20px;
    border: 1px solid var(--mmpt-primary);
    background: transparent;
    color: var(--mmpt-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
}
.mmpt-today-btn:hover {
    background: var(--mmpt-primary);
    color: #fff;
}


/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .mmpt-m-row { padding: 10px 2px; margin: 2px 0; border-radius: 10px; }
    .mmpt-m-headers { padding: 0 2px 8px; }
    .mmpt-m-cell .mmpt-m-start { font-size: .7em; }
    .mmpt-m-cell .mmpt-m-jam { font-size: .85em; }
    .mmpt-m-cell .mmpt-m-single { font-size: .85em; }
    .mmpt-m-row .mmpt-m-day { font-size: .75em; }
    .mmpt-m-row .mmpt-m-date { font-size: .9em; }
    .mmpt-np-time { font-size: 1.8em; }
}
@media (max-width: 420px) {
    .mmpt-m-headers, .mmpt-m-row { grid-template-columns: 32px 26px 1fr 1fr 1fr 1fr 1fr 1fr; }
    .mmpt-m-cell .mmpt-m-start { font-size: .65em; }
    .mmpt-m-cell .mmpt-m-jam { font-size: .78em; }
    .mmpt-m-cell .mmpt-m-single { font-size: .78em; }
    .mmpt-daily { padding: 6px 12px 16px; }
    .mmpt-prayer-row .mmpt-p-name { font-size: 1em; }
    .mmpt-prayer-row .mmpt-p-begin, .mmpt-prayer-row .mmpt-p-jamat { width: 80px; font-size: .82em; }
    .mmpt-col-headers .mmpt-ch-begin, .mmpt-col-headers .mmpt-ch-jamat { width: 80px; }
}
