/* ==========================================================================
   Buste Chiuse Serie B
   Palette: verde campo + oro sigillo, su crema
   Type: Fraunces (titoli) + Inter (corpo)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

#busteb-container {
    --busteb-pitch: #1b4332;
    --busteb-pitch-dark: #12291d;
    --busteb-gold: #c9a227;
    --busteb-gold-light: #e8c766;
    --busteb-cream: #f6f3ea;
    --busteb-ink: #17241d;
    --busteb-muted: #6b7a70;
    --busteb-danger: #b3261e;
    --busteb-danger-dark: #8c1d17;

    max-width: 560px;
    margin: 32px auto;
    padding: 0 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--busteb-ink);
    text-align: center;
}

.busteb-error {
    max-width: 560px;
    margin: 32px auto;
    background: #fdecea;
    color: var(--busteb-danger-dark);
    padding: 18px 22px;
    border-radius: 12px;
    border: 1px solid #f3c6c2;
    font-weight: 600;
    text-align: center;
}

.busteb-already-sent {
    background: linear-gradient(135deg, var(--busteb-pitch) 0%, var(--busteb-pitch-dark) 100%);
    color: #f6f3ea;
    padding: 40px 32px;
    border-radius: 20px;
    font-weight: 600;
    text-align: center;
    font-size: 17px;
    line-height: 1.5;
    box-shadow: 0 12px 32px rgba(27, 67, 50, 0.25);
}

/* ---------------------------------------------------------------------- */
/* Sigillo + intestazione                                                 */
/* ---------------------------------------------------------------------- */

.busteb-seal {
    width: 56px;
    height: 56px;
    line-height: 56px;
    margin: 0 auto -28px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--busteb-gold-light), var(--busteb-gold) 70%);
    box-shadow: 0 6px 16px rgba(201, 162, 39, 0.45), 0 0 0 6px var(--busteb-cream);
    font-size: 24px;
    position: relative;
    z-index: 2;
}

.busteb-seal-admin {
    background: radial-gradient(circle at 35% 30%, #f0f0f0, #cfcfcf 70%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 0 0 6px var(--busteb-cream);
}

.busteb-header {
    padding: 44px 24px 28px;
    background: var(--busteb-pitch);
    border-radius: 20px 20px 0 0;
    position: relative;
}

.busteb-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--busteb-gold-light);
    margin-bottom: 10px;
}

.busteb-header h2 {
    margin: 0 0 8px;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.2;
    color: #ffffff;
}

.busteb-subtitle {
    margin: 0;
    font-size: 13.5px;
    color: rgba(246, 243, 234, 0.75);
}

/* ---------------------------------------------------------------------- */
/* Card form                                                              */
/* ---------------------------------------------------------------------- */

.busteb-card {
    background: #ffffff;
    border-radius: 0 0 20px 20px;
    padding: 8px 28px 32px;
    box-shadow: 0 16px 40px rgba(23, 36, 29, 0.12);
}

.busteb-field-group {
    padding: 22px 0;
    border-bottom: 1px dashed #e3e0d4;
    text-align: left;
}

.busteb-field-group:last-of-type {
    border-bottom: none;
    padding-bottom: 4px;
}

.busteb-field-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.busteb-role-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--busteb-cream);
    font-size: 15px;
    flex-shrink: 0;
}

.busteb-role-name {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 16px;
    color: var(--busteb-pitch);
}

.busteb-select-label,
.busteb-amount-label {
    display: block;
    color: var(--busteb-muted);
    font-weight: 500;
    font-size: 12.5px;
    margin-bottom: 6px;
}

.busteb-amount-label {
    margin-top: 14px;
}

.busteb-select-wrapper {
    position: relative;
}

.busteb-player-select {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #e3e0d4;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--busteb-ink);
    background: var(--busteb-cream);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b4332' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.busteb-player-select:hover {
    border-color: var(--busteb-gold);
}

.busteb-player-select:focus {
    outline: none;
    border-color: var(--busteb-pitch);
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.12);
}

.busteb-amount-wrapper {
    display: flex;
    align-items: stretch;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #e3e0d4;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.busteb-amount-wrapper:focus-within {
    border-color: var(--busteb-pitch);
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.12);
}

.busteb-euro-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--busteb-pitch);
    color: var(--busteb-gold-light);
    font-weight: 700;
    padding: 0 16px;
    font-size: 14.5px;
}

.busteb-amount-input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--busteb-ink);
    background: var(--busteb-cream);
    min-width: 0;
}

.busteb-amount-input:focus {
    outline: none;
}

.busteb-amount-input::-webkit-outer-spin-button,
.busteb-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.busteb-amount-input[type='number'] {
    -moz-appearance: textfield;
}

.busteb-info-text {
    color: var(--busteb-muted);
    font-size: 12px;
    font-style: italic;
    text-align: center;
    margin: 22px 0 22px;
    line-height: 1.5;
}

/* ---------------------------------------------------------------------- */
/* Bottone invio                                                          */
/* ---------------------------------------------------------------------- */

.busteb-submit-wrapper {
    display: flex;
    justify-content: center;
}

.busteb-submit-btn {
    background: linear-gradient(135deg, var(--busteb-gold-light) 0%, var(--busteb-gold) 100%);
    color: var(--busteb-pitch-dark);
    border: none;
    padding: 15px 52px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(201, 162, 39, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.busteb-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(201, 162, 39, 0.45);
}

.busteb-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.busteb-submit-btn:disabled {
    background: #e3e0d4;
    color: #a8a397;
    cursor: not-allowed;
    box-shadow: none;
}

/* Messaggi */
.busteb-message {
    margin-top: 18px;
    padding: 13px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
}

.busteb-message-success {
    background: #e7f4ea;
    color: #1e5631;
}

.busteb-message-error {
    background: #fdecea;
    color: var(--busteb-danger-dark);
}

/* ==========================================================================
   Amministrazione
   ========================================================================== */

.busteb-admin-section {
    background: #ffffff;
    border-radius: 0 0 20px 20px;
    padding: 28px 28px 32px;
    box-shadow: 0 16px 40px rgba(23, 36, 29, 0.12);
}

.busteb-admin-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.busteb-btn-refresh,
.busteb-btn-assign {
    border: none;
    border-radius: 999px;
    padding: 13px 30px;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.busteb-btn-refresh {
    background: #ffffff;
    color: var(--busteb-pitch);
    border: 1.5px solid var(--busteb-pitch);
}

.busteb-btn-refresh:hover:not(:disabled) {
    background: var(--busteb-pitch);
    color: #ffffff;
}

.busteb-btn-assign {
    background: linear-gradient(135deg, var(--busteb-danger) 0%, var(--busteb-danger-dark) 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(179, 38, 30, 0.3);
}

.busteb-btn-assign:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(179, 38, 30, 0.4);
}

.busteb-btn-refresh:disabled,
.busteb-btn-assign:disabled {
    background: #e3e0d4;
    color: #a8a397;
    border-color: transparent;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.busteb-bids-list-section {
    width: 100%;
}

.busteb-bids-list-section h4 {
    margin: 0 0 12px;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 15.5px;
    color: var(--busteb-pitch);
    text-align: left;
}

.busteb-placeholder {
    text-align: center;
    color: var(--busteb-muted);
    font-style: italic;
    padding: 32px;
    background: var(--busteb-cream);
    border-radius: 12px;
    font-size: 13.5px;
}

.busteb-admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-size: 13.5px;
}

.busteb-admin-table th,
.busteb-admin-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid #ece9de;
}

.busteb-admin-table th {
    background: var(--busteb-pitch);
    color: var(--busteb-gold-light);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.busteb-admin-table tr:last-child td {
    border-bottom: none;
}

.busteb-admin-table tr:nth-child(even) td {
    background: var(--busteb-cream);
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                             */
/* ---------------------------------------------------------------------- */

@media (max-width: 600px) {
    #busteb-container {
        margin: 20px auto;
        padding: 0 12px;
    }

    .busteb-header {
        padding: 40px 18px 24px;
    }

    .busteb-header h2 {
        font-size: 23px;
    }

    .busteb-card,
    .busteb-admin-section {
        padding-left: 18px;
        padding-right: 18px;
    }

    .busteb-submit-btn {
        width: 100%;
    }

    .busteb-btn-refresh,
    .busteb-btn-assign {
        width: 100%;
    }
}
