/* ==========================================================
 * DataFirefly Social Connect: front styles
 * Button rules are scoped to .dfsc-buttons: other DataFirefly modules (Simple Checkout)
 * also use a .dfsc-btn class, loaded on the same pages.
 * ========================================================== */

.dfsc-buttons {
    margin: 1.25rem 0;
    width: 100%;
}

.dfsc-buttons__sep {
    text-align: center;
    margin: 1rem 0 0.875rem;
    position: relative;
    color: #999;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.dfsc-buttons__sep::before,
.dfsc-buttons__sep::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 2rem);
    height: 1px;
    background: #e5e5e5;
}
.dfsc-buttons__sep::before { left: 0; }
.dfsc-buttons__sep::after  { right: 0; }
.dfsc-buttons__sep span {
    background: #fff;
    padding: 0 0.75rem;
    position: relative;
}

.dfsc-buttons__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dfsc-buttons .dfsc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
    min-height: 44px;
    user-select: none;
}
.dfsc-buttons .dfsc-btn:hover { transform: translateY(-1px); text-decoration: none !important; }
.dfsc-buttons .dfsc-btn:active { transform: translateY(0); }

.dfsc-buttons .dfsc-btn__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    object-fit: contain;
}

.dfsc-buttons .dfsc-btn__label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ----- Provider colours (default skin: rounded white-card) ----- */
.dfsc-buttons .dfsc-btn--google {
    background: #ffffff;
    color: #3c4043;
    border-color: #dadce0;
}
.dfsc-buttons .dfsc-btn--google:hover { background: #f8f9fa; box-shadow: 0 1px 3px rgba(60,64,67,0.15); }

.dfsc-buttons .dfsc-btn--apple {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}
.dfsc-buttons .dfsc-btn--apple:hover { background: #1a1a1a; }
.dfsc-buttons .dfsc-btn--apple .dfsc-btn__icon { filter: invert(1); }

.dfsc-buttons .dfsc-btn--facebook {
    background: #1877F2;
    color: #ffffff;
    border-color: #1877F2;
}
.dfsc-buttons .dfsc-btn--facebook:hover { background: #1564d6; }
/* Facebook logo kept in its colours on a white disc (brand guidelines), not flattened to white */
.dfsc-buttons .dfsc-btn--facebook .dfsc-btn__icon { background: #ffffff; border-radius: 50%; }

/* ----- Style variants ----- */
.dfsc-buttons--rounded .dfsc-btn { border-radius: 8px; }
.dfsc-buttons--pill    .dfsc-btn { border-radius: 999px; }
.dfsc-buttons--square  .dfsc-btn { border-radius: 0; }

.dfsc-buttons--ghost .dfsc-btn {
    background: transparent !important;
    color: #333 !important;
    border-color: #d0d0d0 !important;
    border-radius: 8px;
}
.dfsc-buttons--ghost .dfsc-btn:hover { background: #f5f5f5 !important; }
.dfsc-buttons--ghost .dfsc-btn--apple    .dfsc-btn__icon { filter: none; }
.dfsc-buttons--ghost .dfsc-btn--facebook .dfsc-btn__icon { background: transparent; }

.dfsc-buttons--minimal .dfsc-btn {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    min-height: 38px;
    font-size: 0.85rem;
}

/* ----- Register / inline context tweaks ----- */
.dfsc-buttons--register { margin-top: 0; margin-bottom: 1.5rem; }
/* Above a form (registration, checkout): separator after the buttons */
.dfsc-buttons--top { margin-top: 0.25rem; }
.dfsc-buttons--top .dfsc-buttons__sep { margin: 1.25rem 0 0.25rem; }

@media (min-width: 768px) {
    /* Side by side when there is room, wrapping instead of truncating the labels */
    .dfsc-buttons__list { flex-direction: row; flex-wrap: wrap; }
    .dfsc-buttons .dfsc-btn { flex: 1 1 210px; }
}

.dfsc-buttons .dfsc-btn:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; }

.dfsc-buttons__consent {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    color: #777;
    text-align: center;
}
.dfsc-buttons__consent a { text-decoration: underline; }

/* ==========================================================
 * "Connected accounts" page
 * ========================================================== */
.dfsc-account__intro { margin: 0 0 1rem; color: #666; }

.dfsc-account__list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
}
.dfsc-account__row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #f0f0f0;
}
.dfsc-account__row:first-child { border-top: 0; }
.dfsc-account__avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    object-fit: cover;
}
.dfsc-account__avatar--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f5;
}
.dfsc-account__icon { width: 16px; height: 16px; vertical-align: -2px; margin-right: 0.25rem; }
.dfsc-account__meta { flex: 1; min-width: 0; }
.dfsc-account__meta strong { display: block; font-size: 0.95rem; }
.dfsc-account__meta small {
    display: block;
    color: #777;
    font-size: 0.825rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dfsc-account__action { flex: 0 0 auto; }
.dfsc-account__action form { margin: 0; }

@media (max-width: 480px) {
    .dfsc-account__row { flex-wrap: wrap; }
    .dfsc-account__action { width: 100%; padding-left: calc(40px + 0.875rem); }
}

/* "Connected accounts": link that cannot be removed (account without email) */
.dfsc-account__locked { color: #6c757d; font-size: 0.8rem; white-space: nowrap; }
