/* Benefit page - supplier-details accordion ("פרטי הספק") + contact form */

.supplier-details-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* When there's no info card, the supplier card spans the full container width
   as a visual shell. Header keeps the full-width treatment (title + chevron stay
   anchored to the card's edges), but the inner content gets constrained to a
   narrower centered column so the form inputs don't stretch across 1200px.
   Keyed off the absence of the info card rather than :only-child, since supplier
   now lives inside .supplier-branches-col (often beside a branches card). */
.info-cards-container:not(:has(.info-card)) .supplier-details-content {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

@media (max-width: 768px) {
    .supplier-details-card {
        max-width: 100%;
        padding: 16px;
    }
}

.supplier-details-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
}

.supplier-details-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 500;
    line-height: 50px;
    color: #0B0427;
    margin: 0;
}

/* Brand color applied via _benefit_dynamic_styles.php */
.supplier-details-title i {
    font-size: 18px;
    color: #2020B3;
}

@media (max-width: 768px) {
    .supplier-details-title {
        font-size: 18px;
        line-height: 1.4;
    }
}

.supplier-details-toggle {
    background: #2020B3;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.supplier-details-card.open .supplier-details-toggle {
    transform: rotate(180deg);
}

.supplier-details-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
}

.supplier-details-card.open .supplier-details-content {
    max-height: 4000px;
    opacity: 1;
    margin-top: 20px;
}

.supplier-description {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    color: #0B0427;
    text-align: right;
    margin: 0;
}

/* Phone */
.supplier-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-phone {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #0B0427;
}

.contact-phone i {
    font-size: 15px;
    flex-shrink: 0;
}

.phone-numbers {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    font-size: 15px;
    font-weight: 400;
    color: #0B0427;
    flex-wrap: wrap;
}

.phone-numbers a {
    color: inherit;
    text-decoration: none;
}

.phone-numbers a:hover {
    text-decoration: underline;
}

.phone-numbers .separator {
    color: #E1E1E1;
}

/* Social */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.social-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    color: #0B0427;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.social-button:hover {
    color: #0B0427;
    box-shadow: 0 2px 6px rgba(11, 4, 39, 0.08);
}

/* Egged forces `a { border-color: <brand> !important }`; pin the rest border to
   the neutral value (hover keeps the brand tint from _benefit_dynamic_styles.php). */
.supplier-details-card .social-button {
    border-color: #EAEAEA !important;
}

.social-button i {
    font-size: 14px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Small brand-color section heading used above phone / social / form blocks.
   Brand color applied via _benefit_dynamic_styles.php. */
.supplier-section-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #0B0427;
    margin-bottom: 2px;
    text-align: right; /* egged ancestors inherit text-align: center; pin to right (RTL start) */
}

/* Form alerts — hide success block until JS adds .is-visible on submit success.
   Mirrors contact.css's scoped rule; the global `.form-alert` (error variant) is
   already hidden by login.css, but `.form-alert--success` only has the hide rule
   when scoped to a card container. */
.supplier-details-card .form-alert--success {
    display: none;
    width: 100%;
    margin: 8px 0 16px 0;
    padding: 14px 16px;
    background: #E8F4EA;
    border: 1px solid #C5E5CA;
    border-radius: 8px;
    color: #1F7A2E;
    font-size: 15px;
    line-height: 1.5;
}

.supplier-details-card .form-alert--success.is-visible {
    display: block;
}

.supplier-details-card .form-alert--success strong {
    display: block;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

/* Contact form section — wraps the form-system markup */
.supplier-contact-form-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    padding-top: 20px;
    border-top: 1px solid #E1E1E1;
}

.supplier-contact-form-section .contact-form-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #0B0427;
    margin: 0 0 4px;
    text-align: right;
}

/* Scoped form-system overrides — login.css defaults are tuned for full-page
   focus screens; in-card the labels/inputs feel too large. Same pattern as
   checkout-shipping.css. */
.supplier-details-card .form-container {
    gap: 0;
}

/* 2-col grid: name / subject / message span both columns via --full,
   phone + email share a row as default single-column cells. */
.supplier-details-card .supplier-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
}

.supplier-details-card .input-container--full {
    grid-column: 1 / -1;
}

.supplier-details-card .input-container {
    padding: 10px 0 4px 0;
    gap: 4px;
}

/* Drop login.css's justify-content: center on labels so the icon + text + star
   start-align (right edge in RTL) instead of huddling in the middle. Also pull
   the label text up to #0B0427 to match .info-card / .supplier-description text
   throughout the card (login.css default #46494F reads too gray inside the card). */
.supplier-details-card .input-container label {
    justify-content: flex-start;
    color: #0B0427;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.supplier-details-card .input-container input {
    font-size: 15px;
    line-height: 20px;
    padding: 2px 16px;
    text-align: right;
}

/* Textarea — login.css only styles <input>, so we mirror the focus ring +
   underline-ish container style here. */
.supplier-details-card .input-container--textarea textarea {
    width: 100%;
    min-height: 90px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    color: #1F1A2E;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    outline: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    text-align: right;
}

.supplier-details-card .input-container--textarea textarea:hover {
    border-color: #9ca3af;
}

/* Submit button — scale down from login.css's 50px default to fit the card. */
.supplier-details-card .submit-button {
    height: 46px;
    font-size: 16px;
    margin-top: 12px;
}

@media (max-width: 768px) {
    .social-buttons {
        justify-content: center;
    }

    /* Stack phone + email back into single column on narrow viewports. */
    .supplier-details-card .supplier-form-grid {
        grid-template-columns: 1fr;
    }

    .supplier-details-card .submit-button {
        font-size: 15px;
    }
}
