/* Pharmacy Profile Page Styles — scoped under .pharmacy-profile-page */

.pharmacy-profile-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px;
    color: #333;
    line-height: 1.6;
}

.pharmacy-profile-page h2 {
    font-size: 1.3rem;
    color: #1565c0;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
    margin: 28px 0 16px;
}

.pharmacy-profile-page h3 {
    font-size: 1.1rem;
    color: #1565c0;
    margin: 0 0 8px;
}

/* ─── 1. Header / Identity ─── */
.pprofile-header {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pprofile-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 240px;
}

.pprofile-logo-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.pprofile-logo-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #81c784;
}

.pprofile-logo-teaser {
    font-size: 0.65rem;
    font-weight: 600;
    color: #7b1fa2;
    background: #f3e5f5;
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

.pprofile-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pprofile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1565c0;
    margin: 0;
    line-height: 1.2;
}

.pprofile-name-ar {
    font-size: 1.05rem;
    color: #555;
    font-family: 'Segoe UI', 'Noto Sans Arabic', sans-serif;
}

.pprofile-trust {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
}

.pprofile-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 140px;
}

.pprofile-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pprofile-status-badge.status-open {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.pprofile-status-badge.status-closed {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.pprofile-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: #555;
}

.pprofile-stars {
    font-weight: 700;
    color: #f9a825;
}

.pprofile-stars-icon {
    color: #fbc02d;
    letter-spacing: 1px;
}

.pprofile-reviews-count {
    font-size: 0.8rem;
    color: #888;
}

.pprofile-socials {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.pprofile-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #555;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.pprofile-social:hover {
    background: #e0e0e0;
    color: #333;
}

.pprofile-social-facebook:hover {
    background: #1877f2;
    color: #fff;
}

.pprofile-social-instagram:hover {
    background: #e4405f;
    color: #fff;
}

.pprofile-social-website:hover {
    background: #1976d2;
    color: #fff;
}

/* ─── Promo Banner ─── */
.pprofile-promo-banner {
    background: #fff8e1;
    border: 2px dashed #f9a825;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pprofile-promo-tag {
    flex-shrink: 0;
    background: #f9a825;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.pprofile-promo-text {
    margin: 0;
    color: #5d4037;
    font-size: 1rem;
    font-weight: 500;
    flex: 1 1 200px;
    word-break: break-word;
}

.pprofile-promo-section {
    margin-top: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pprofile-promo-placeholder {
    text-align: center;
    padding: 24px 16px;
    background: #f5f5f5;
    border: 2px dashed #bdbdbd;
    border-radius: 10px;
    color: #666;
}

.pprofile-promo-placeholder p {
    margin: 4px 0;
}

.pprofile-promo-lock {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
    color: #9e9e9e;
}

.pprofile-promo-teaser {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #7b1fa2;
    background: #f3e5f5;
    padding: 6px 12px;
    border-radius: 20px;
}

/* ─── 2. Key Info Block ─── */
.pprofile-key-info {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pprofile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.pprofile-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pprofile-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
}

.pprofile-info-item address {
    font-style: normal;
    color: #333;
}

.pprofile-tel,
.pprofile-map-link {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
}

.pprofile-tel:hover,
.pprofile-map-link:hover {
    text-decoration: underline;
}

.pprofile-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #25d366;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    width: fit-content;
}

.pprofile-whatsapp:hover {
    background: #1ebe57;
}

.pprofile-horaires,
.pprofile-gardewarn {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}

.pprofile-horaires p,
.pprofile-gardewarn p {
    margin: 6px 0 0;
    color: #444;
    font-size: 0.95rem;
    white-space: pre-wrap;
}

.pprofile-horaires-garde {
    margin-top: 8px !important;
    padding: 8px 12px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 3px solid #2196f3;
    color: #1565c0 !important;
    font-size: 0.95rem;
}

/* ─── Next Guard ─── */
.pprofile-next-guard {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 12px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.pprofile-next-guard-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.pprofile-next-guard-label {
    font-weight: 700;
    color: #2e7d32;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pprofile-next-guard-value {
    font-weight: 600;
    color: #1b5e20;
    font-size: 1.05rem;
}

/* ─── 3. Weekly Schedule + Guard Duty ─── */
.pprofile-schedule-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
    border: 1px solid #bbdefb;
    border-radius: 14px;
    padding: 24px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.08);
}

.pprofile-schedule-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.pprofile-schedule-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #1565c0;
}

.pprofile-schedule-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.pprofile-week-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.pprofile-week-table thead {
    background: #1976d2;
}

.pprofile-week-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.pprofile-week-table td {
    padding: 10px 14px;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.pprofile-week-table tbody tr:last-child td {
    border-bottom: none;
}

.pprofile-week-today {
    background: #fff8e1;
}

.pprofile-week-day {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.pprofile-week-today-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #ff9800;
    color: #fff;
}

.pprofile-week-normal {
    color: #555;
}

.pprofile-week-garde-none {
    color: #ccc;
}

.pprofile-week-garde-active {
    background: #e8f5e9;
}

.pprofile-week-garde-time {
    font-weight: 700;
    color: #2e7d32;
    font-size: 0.9rem;
}

/* Mobile: convert weekly schedule table to cards */
@media (max-width: 600px) {
    .pprofile-week-table,
    .pprofile-week-table tbody,
    .pprofile-week-table tr,
    .pprofile-week-table td {
        display: block;
        width: 100%;
    }

    .pprofile-week-table thead {
        display: none;
    }

    .pprofile-week-table tr {
        margin-bottom: 12px;
        padding: 12px;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        border-bottom: none;
    }

    .pprofile-week-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.95rem;
    }

    .pprofile-week-table td:last-child {
        border-bottom: none;
    }

    .pprofile-week-table td::before {
        font-weight: 700;
        color: #333;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .pprofile-week-table td:nth-child(1)::before { content: "Jour"; }
    .pprofile-week-table td:nth-child(2)::before { content: "Horaires"; }
    .pprofile-week-table td:nth-child(3)::before { content: "Garde"; }

    .pprofile-week-day {
        font-size: 1rem;
    }

    .pprofile-week-today-badge {
        margin-left: 0;
        margin-top: 4px;
    }

    .pprofile-week-garde-active {
        background: transparent;
    }

    .pprofile-week-garde-active .pprofile-week-garde-time {
        background: #e8f5e9;
        padding: 4px 8px;
        border-radius: 6px;
    }
}

.pprofile-schedule-guard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid #2e7d32;
}

.pprofile-schedule-guard-footer .pprofile-guard-next {
    margin: 0;
    font-weight: 600;
    color: #1565c0;
}

.pprofile-guard-next {
    margin: 0 0 8px;
    font-weight: 600;
    color: #1565c0;
}

.pprofile-guard-horaires {
    margin: 0;
    font-family: inherit;
    font-size: 0.9rem;
    color: #444;
    white-space: pre-wrap;
    background: transparent;
    border: none;
    padding: 0;
}

.pprofile-on-duty-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.pprofile-on-duty-flag.pprofile-off-duty {
    background: #fff3e0;
    color: #e65100;
    border-color: #ffe0b2;
}

/* ─── 3.5 Opening Hours ─── */
.pprofile-hours {
    margin-top: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pprofile-hours-grid {
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.pprofile-hours-row {
    display: table-row;
    border-bottom: 1px solid #f0f0f0;
}

.pprofile-hours-row:last-child {
    border-bottom: none;
}

.pprofile-hours-day,
.pprofile-hours-slot {
    display: table-cell;
    padding: 10px 8px;
    font-size: 0.95rem;
    vertical-align: middle;
}

.pprofile-hours-day {
    width: 30%;
    font-weight: 600;
    color: #333;
}

.pprofile-hours-slot {
    width: 35%;
    color: #555;
    text-align: center;
}

.pprofile-hours-sunday .pprofile-hours-day {
    color: #c62828;
}

.pprofile-hours-note {
    margin: 14px 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #7b1fa2;
    background: #f3e5f5;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
}

/* ─── 4. Services ─── */
.pprofile-services {
    margin-top: 16px;
}

.pprofile-services-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.pprofile-services-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.pprofile-check {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.pprofile-check-partial {
    background: #fff8e1;
    color: #f57c00;
}

/* ─── 4.8 Product Availability ─── */
.pprofile-products {
    margin-top: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pprofile-product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.pprofile-product-intro {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: #555;
}

.pprofile-product-search {
    margin-bottom: 10px;
}

.pprofile-product-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.pprofile-product-input:focus {
    border-color: #4caf50;
}

.pprofile-product-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.pprofile-product-wa {
    background: #25d366;
}

.pprofile-product-wa:hover {
    background: #1ebe57;
}

.pprofile-product-fb {
    background: #0084ff;
}

.pprofile-product-fb:hover {
    background: #0073e6;
}

.pprofile-product-demo {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.pprofile-product-demo small {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 4px;
}

.pprofile-product-hint {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: #888;
}

.pprofile-products-placeholder {
    text-align: center;
    padding: 24px 16px;
    background: #f5f5f5;
    border: 2px dashed #bdbdbd;
    border-radius: 10px;
    color: #666;
}

.pprofile-products-placeholder p {
    margin: 4px 0;
}

.pprofile-products-lock {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
    color: #9e9e9e;
}

.pprofile-products-teaser {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #7b1fa2;
    background: #f3e5f5;
    padding: 6px 12px;
    border-radius: 20px;
}

/* ─── 4.5 Team / Pharmacist ─── */
.pprofile-team {
    margin-top: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pprofile-team-content {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.6;
}

.pprofile-team-placeholder {
    text-align: center;
    padding: 24px 16px;
    background: #f5f5f5;
    border: 2px dashed #bdbdbd;
    border-radius: 10px;
    color: #666;
}

.pprofile-team-placeholder p {
    margin: 4px 0;
}

.pprofile-team-lock {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
    color: #9e9e9e;
}

.pprofile-team-teaser {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #7b1fa2;
    background: #f3e5f5;
    padding: 6px 12px;
    border-radius: 20px;
}

/* ─── 5. Neighbourhood & Map ─── */
.pprofile-neighbourhood {
    margin-top: 16px;
}

.pprofile-map-wrap {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pprofile-map-iframe {
    display: block;
    width: 100%;
    height: 320px;
    border: 0;
}

/* ─── 6. Footer CTA ─── */
.pprofile-cta {
    margin-top: 28px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.pprofile-cta p {
    margin: 8px 0 16px;
    color: #444;
}

.pprofile-cta-btn {
    display: inline-block;
    background: #1976d2;
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.pprofile-cta-btn:hover {
    background: #1565c0;
}

/* ─── Error states ─── */
.pharmacy-profile-error {
    color: #c62828;
    padding: 16px;
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 8px;
}

/* ─── 4.55 Photo Gallery ─── */
.pprofile-gallery {
    margin-top: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pprofile-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.pprofile-gallery-item {
    aspect-ratio: 4 / 3;
    background: #f5f5f5;
    border: 2px dashed #bdbdbd;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-align: center;
    padding: 12px;
    font-size: 0.85rem;
}

.pprofile-gallery-item span {
    font-size: 2rem;
    margin-bottom: 6px;
}

.pprofile-gallery-item p {
    margin: 0;
    font-weight: 500;
}

.pprofile-gallery-placeholder {
    text-align: center;
    padding: 24px 16px;
    background: #f5f5f5;
    border: 2px dashed #bdbdbd;
    border-radius: 10px;
    color: #666;
}

.pprofile-gallery-placeholder p {
    margin: 4px 0;
}

.pprofile-gallery-lock {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
    color: #9e9e9e;
}

.pprofile-gallery-teaser {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #7b1fa2;
    background: #f3e5f5;
    padding: 6px 12px;
    border-radius: 20px;
}

@media (max-width: 600px) {
    .pprofile-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .pprofile-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .pprofile-identity {
        flex-wrap: wrap;
        width: 100%;
    }
    .pprofile-titles {
        flex: 1;
        min-width: 180px;
    }
    .pprofile-admin-toggle-premium {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        text-align: center;
    }
    .pprofile-meta {
        align-items: flex-start;
    }
    .pprofile-info-grid {
        grid-template-columns: 1fr;
    }
    .pprofile-name {
        font-size: 1.25rem;
    }
    .pprofile-map-iframe {
        height: 240px;
    }
}

#footer-bottom {
    display: none !important;
}
