/* Automatic Service marketplace cards on the public seller page (user.php).
   Every rule is scoped under .automatic-service-card, which is ONLY ever
   rendered for proposals backed by the Automatic Services system
   (seller_automatic_services.proposal_id) - this file has zero effect on
   normal service cards (.proposal-div, styled entirely by styles/style.css
   and styles/custom.css, both untouched here) or any other page.

   Colors: black/white/gray + one explicit, scoped Roladel Green accent,
   the same reusable alias pattern already used for the homepage-only
   green exception (--home-accent-green in styles/variables.css). */

.automatic-service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--light-bg, #ffffff);
    border: 1px solid var(--light-border, #dddddd);
    border-radius: 16px;
    padding: 20px 16px;
    height: 100%;
    box-sizing: border-box;
}

.automatic-service-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.6;
    white-space: nowrap;
}

.automatic-service-card__badge--featured {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #000000;
    color: #ffffff;
}

.automatic-service-card__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 10px 0;
}

.automatic-service-card__badge--neutral {
    background: var(--light-surface, #f8f9fa);
    color: var(--light-text, #222222);
    border: 1px solid var(--light-border, #dddddd);
}

/* Billing badge - deliberately neutral (never green). Communicates a
   real, supplier-reported billing fact (e.g. MONTHLY), not the "this is
   an Automatic Service" signal, so it does not share the green accent
   reserved for BUY NOW/other real brand moments on this card. */
.automatic-service-card__billing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.6;
    white-space: nowrap;
    background: var(--light-surface, #f8f9fa);
    color: var(--light-text, #222222);
    border: 1px solid var(--light-border, #dddddd);
}

.automatic-service-card__billing-icon {
    font-size: 0.75em;
    color: var(--light-text-muted, #6c757d);
}

.automatic-service-card__image {
    width: 96px;
    height: 96px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    margin: 4px auto 0;
    border: 3px solid var(--home-accent-green, #0a7a2f);
    background: var(--light-surface, #f8f9fa);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.automatic-service-card__image-el {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.automatic-service-card__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--light-text-muted, #6c757d);
}

.automatic-service-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--light-text, #222222);
    margin: 4px 0 0;
    word-wrap: break-word;
}

.automatic-service-card__desc {
    font-size: 0.85rem;
    color: var(--light-text-muted, #6c757d);
    margin: 6px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.automatic-service-card__price {
    margin-top: 12px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--light-text, #222222);
}

.automatic-service-card__price-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--light-text-muted, #6c757d);
}

.automatic-service-card__actions {
    width: 100%;
    margin-top: 14px;
}

.automatic-service-card__buy {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: #000000;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.automatic-service-card__buy:hover,
.automatic-service-card__buy:focus {
    background: #1a1a1a;
    color: #ffffff;
    text-decoration: none;
}

/* Dark mode - same html.dark mechanism used sitewide */
html.dark .automatic-service-card {
    background: var(--dark-surface, #1e1e1e);
    border-color: var(--dark-border, #333333);
}
html.dark .automatic-service-card__badge--featured {
    background: #ffffff;
    color: #000000;
}
html.dark .automatic-service-card__badge--neutral {
    background: var(--dark-surface-alt, #2a2a2a);
    color: var(--dark-text, #ffffff);
    border-color: var(--dark-border, #333333);
}
html.dark .automatic-service-card__billing {
    background: var(--dark-surface-alt, #2a2a2a);
    color: var(--dark-text, #ffffff);
    border-color: var(--dark-border, #333333);
}
html.dark .automatic-service-card__billing-icon {
    color: var(--dark-text-muted, #aaaaaa);
}
html.dark .automatic-service-card__image {
    background: var(--dark-surface-alt, #2a2a2a);
}
html.dark .automatic-service-card__image-placeholder {
    color: var(--dark-text-muted, #aaaaaa);
}
html.dark .automatic-service-card__title {
    color: var(--dark-text, #ffffff);
}
html.dark .automatic-service-card__desc,
html.dark .automatic-service-card__price-label {
    color: var(--dark-text-muted, #aaaaaa);
}
html.dark .automatic-service-card__price {
    color: var(--dark-text, #ffffff);
}
html.dark .automatic-service-card__buy {
    background: #ffffff;
    color: #000000;
}
html.dark .automatic-service-card__buy:hover,
html.dark .automatic-service-card__buy:focus {
    background: #e6e6e6;
    color: #000000;
}

/* Mobile: 2 Automatic Service cards per row (the grid wrapper itself
   changed from col-12 to col-6 in includes/automatic_service_card.php -
   this block only makes the card's own CONTENTS comfortably fit at that
   narrower ~half-screen width; it does not touch layout/columns, and has
   no effect on Normal Service cards at all). */
@media (max-width: 767.98px) {
    .automatic-service-card {
        padding: 12px 10px;
    }
    .automatic-service-card__image,
    .automatic-service-card__image-placeholder {
        width: 64px;
        height: 64px;
        font-size: 1.3rem;
    }
    .automatic-service-card__badges {
        gap: 4px;
    }
    .automatic-service-card__badge,
    .automatic-service-card__billing {
        font-size: 0.6rem;
        padding: 3px 7px;
        white-space: normal;
    }
    .automatic-service-card__title {
        font-size: 0.85rem;
    }
    .automatic-service-card__desc {
        font-size: 0.75rem;
    }
    .automatic-service-card__price {
        font-size: 0.95rem;
    }
    .automatic-service-card__price-label {
        font-size: 0.65rem;
    }
    .automatic-service-card__buy {
        padding: 9px 8px;
        font-size: 0.75rem;
    }
}
