/* ============================================================
   PT WebHosting Services Cards – widget.css  v0.4.1
   ============================================================ */

/* ── Grid ──────────────────────────────────────────────────── */
.ptwhs-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 380px));
    justify-content: center;
    align-items: stretch;
}
.ptwhs-grid.ptwhs-single-visible {
    grid-template-columns: minmax(0, 420px);
    justify-content: center;
}
@media (max-width: 1199px) {
    .ptwhs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
    .ptwhs-grid.ptwhs-single-visible {
        grid-template-columns: minmax(0, 420px);
        max-width: 420px;
    }
}
@media (max-width: 767px) {
    .ptwhs-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
    .ptwhs-grid.ptwhs-single-visible {
        grid-template-columns: 1fr;
        max-width: 420px;
    }
}

/* ── Card ───────────────────────────────────────────────────── */
.ptwhs-card {
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 24px 24px 18px;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
    text-align: right;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.ptwhs-card.ptwhs-hidden { display: none; }
.ptwhs-title    { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.ptwhs-subtitle { font-size: 14px; color: #6b7280; margin-bottom: 8px; }

/* ── Image ──────────────────────────────────────────────────── */
.ptwhs-image-wrap { text-align: center; margin: 8px 0 12px; }
.ptwhs-image-wrap img { max-width: 70px; height: auto; display: inline-block; }

/* ── Price ──────────────────────────────────────────────────── */
.ptwhs-price {
    margin-top: 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.ptwhs-price-label { font-size: 0.85rem; font-weight: 500; color: #64748b; }
.ptwhs-price-row   { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ptwhs-number      { font-size: 1.4rem; font-weight: 700; line-height: 1.2; color: #0d6efd; }
.ptwhs-unit        { font-size: 0.9rem; color: #64748b; }
.ptwhs-card-price,
.ptwhs-card-price .amount,
.ptwhs-card-price span { color: #0d6efd !important; }

/* ── Button ─────────────────────────────────────────────────── */
.ptwhs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    margin-top: 8px;
    transition: opacity 0.2s;
}
.ptwhs-btn:hover { opacity: 0.88; }
.ptwhs-card a.ptwhs-btn,
.ptwhs-card a.ptwhs-btn:link,
.ptwhs-card a.ptwhs-btn:visited,
.ptwhs-card a.ptwhs-btn:hover,
.ptwhs-card a.ptwhs-btn:focus,
.ptwhs-card a.ptwhs-btn:active { color: #ffffff !important; }
.ptwhs-btn.ptwhs-order { margin-top: 12px; }

/* ── Toggle button (مشاهده/بستن مشخصات) ──────────────────── */
.ptwhs-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 14px;
    padding: 9px 12px;
    background: transparent;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    direction: rtl;
    outline: none;
}
.ptwhs-toggle-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.ptwhs-toggle-btn:focus:not(:focus-visible) { outline: none; }
.ptwhs-toggle-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}
.ptwhs-toggle-icon {
    display: inline-block;
    transition: transform 0.35s ease;
    font-style: normal;
    line-height: 1;
}
.ptwhs-toggle-btn.open .ptwhs-toggle-icon { transform: rotate(180deg); }

/* ── Collapsible features wrapper ───────────────────────────── */
.ptwhs-features-wrap {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.45s ease, opacity 0.35s ease;
}
.ptwhs-features-wrap.open {
    max-height: 1200px;
    opacity: 1;
}

/* ── Features list ──────────────────────────────────────────── */
.ptwhs-features {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    text-align: right;
    border-top: 1px dashed #e5e7eb;
}
.ptwhs-features li { padding: 4px 0; border-bottom: 1px dashed #e5e7eb; }
.ptwhs-features li:last-child { border-bottom: none; }

.ptwhs-feature {
    display: flex;
    direction: rtl;
    text-align: right;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
    color: #333;
}
.ptwhs-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
}
.ptwhs-icon i { font-size: 0.95rem; }
.ptwhs-text  { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.ptwhs-label { font-weight: 600; }
.ptwhs-value { font-weight: 400; }

/* ── Empty notice ───────────────────────────────────────────── */
.ptwhs-empty {
    text-align: center;
    font-size: 0.95rem;
    color: #64748b;
    padding: 24px;
}

/* ── Controls bar (top) ─────────────────────────────────────── */
.ptwhs-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    direction: rtl;
}

.ptwhs-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.ptwhs-filter-btn {
    padding: 8px 22px;
    border-radius: 999px;
    border: 2px solid #2563eb;
    background: transparent;
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    line-height: 1.4;
    outline: none;
}
.ptwhs-filter-btn:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 3px;
}
.ptwhs-filter-btn:focus:not(:focus-visible) { outline: none; }
.ptwhs-filter-btn:hover { background: #dbeafe; }
.ptwhs-filter-btn.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}
.ptwhs-filter-btn.active:focus,
.ptwhs-filter-btn.active:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

.ptwhs-controls-sep {
    width: 1px;
    height: 32px;
    background: #e2e8f0;
}
@media (max-width: 600px) {
    .ptwhs-controls-sep { display: none; }
}

/* ── Sort dropdown ──────────────────────────────────────────── */
.ptwhs-sort-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #64748b;
}
.ptwhs-sort-wrap label { white-space: nowrap; font-weight: 500; }
.ptwhs-sort-select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ptwhs-sort-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ── Feature filter bar (chip-style, row 2) ────────────────── */
.ptwhs-feature-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 10px;
    margin: 0 auto 28px;
    padding: 12px 14px;
    max-width: 1000px;
    direction: rtl;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 14px;
}

.ptwhs-feature-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.ptwhs-feature-group-label {
    font-size: 0.78rem;
    color: #64748b;
    margin-left: 6px;
    font-weight: 500;
    white-space: nowrap;
}

.ptwhs-feature-sep {
    width: 1px;
    height: 22px;
    background: #cbd5e1;
}
@media (max-width: 600px) {
    .ptwhs-feature-sep { display: none; }
    .ptwhs-feature-group { width: 100%; justify-content: center; }
}

.ptwhs-feature-btn {
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1.4;
    outline: none;
    white-space: nowrap;
}
.ptwhs-feature-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}
.ptwhs-feature-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.ptwhs-feature-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.ptwhs-feature-btn:focus:not(:focus-visible) { outline: none; }

/* ── Reset button ───────────────────────────────────────────── */
.ptwhs-reset-btn {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 999px;
    background: transparent;
    border: 1px dashed #fca5a5;
    color: #dc2626;
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    line-height: 1.4;
    white-space: nowrap;
}
.ptwhs-reset-btn.visible { display: inline-flex; }
.ptwhs-reset-btn:hover {
    background: #fef2f2;
    border-style: solid;
}

/* ── No results message ─────────────────────────────────────── */
.ptwhs-no-results {
    display: none;
    text-align: center;
    font-size: 0.95rem;
    color: #64748b;
    padding: 32px;
    grid-column: 1 / -1;
}
.ptwhs-no-results.visible { display: block; }
