/*
 * Laravel SSO — minimal styling for the plugin's shortcodes.
 * Enqueued on demand only on pages that render one of them.
 * Scoped to the plugin's own markup so it does not affect the host theme.
 */

.auth-box input,
.auth-box button {
    box-sizing: border-box;
}

.auth-box {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 2rem;
    max-width: 420px;
    margin: 3rem auto;
}

.auth-box h1 {
    margin: 0 0 1.5rem;
    font-size: 1.4rem;
}

.auth-box .form-group {
    margin-bottom: 1rem;
}

.auth-box .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #444;
}

.auth-box .form-group input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.15s;
}

.auth-box .form-group input:focus {
    outline: none;
    border-color: #0070f3;
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.15);
}

/*
 * The terms checkbox deliberately sits outside .form-group: the rule above
 * stretches every input in one to the full width of the box.
 */
.auth-box .form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.auth-box .form-check input[type="checkbox"] {
    flex: none;
    width: 1rem;
    height: 1rem;
    margin: 0.15rem 0 0;
    accent-color: #0070f3;
}

.auth-box .form-check label {
    font-size: 0.875rem;
    color: #444;
    line-height: 1.4;
}

.auth-box .btn {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.auth-box a.btn,
.auth-box a.btn:hover,
.auth-box a.btn:focus {
    text-align: center;
    text-decoration: none;
    color: #fff;
}

.auth-box .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-box .btn-primary {
    background: #0070f3;
    color: #fff;
    width: 100%;
    margin-top: 0.5rem;
}

.auth-box .btn-primary:hover:not(:disabled) {
    background: #005ecb;
}

.sso-message {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.sso-message.error {
    background: #fff1f1;
    border: 1px solid #f5c2c2;
    color: #c0392b;
}

.sso-message.success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.auth-switch {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: #666;
}

/*
 * Subscription signup — the plan picker and the "already subscribed" notice.
 */

.auth-box .plan-choice {
    border: none;
    margin: 0 0 1rem;
    padding: 0;
}

.auth-box .plan-choice legend {
    font-size: 0.875rem;
    font-weight: 500;
    color: #444;
    margin-bottom: 0.5rem;
    padding: 0;
}

/*
 * Sits on .form-check for the checkbox alignment, then adds the card framing.
 * The whole card is the label's click target.
 */
.auth-box .plan-option {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.15s, background-color 0.15s;
}

.auth-box .plan-option:hover {
    border-color: #0070f3;
}

.auth-box .plan-option:focus-within {
    border-color: #0070f3;
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.15);
}

.auth-box .plan-option:has(input:checked) {
    border-color: #0070f3;
    background: #f5f9ff;
}

.auth-box .plan-option label {
    flex: 1;
    cursor: pointer;
}

.auth-box .plan-name {
    display: inline;
    font-weight: 600;
    color: #222;
    text-transform: capitalize;
}

.auth-box .plan-price {
    display: inline;
    margin-left: 0.5rem;
    color: #0070f3;
    font-weight: 500;
}

.auth-box .plan-description {
    display: block;
    margin-top: 0.15rem;
    color: #666;
}

/* [sso_plans] — public plan cards, each with its own button. */
.auth-box .plan-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-box .plan-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.75rem;
}

.auth-box .plan-card .plan-select {
    margin-top: 0.75rem;
    align-self: flex-start;
}

.sso-message.info {
    background: #f5f9ff;
    border: 1px solid #b6d4fe;
    color: #0b4f9c;
}

.subscription-details {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: #444;
}

.subscription-details li {
    margin-bottom: 0.25rem;
}

/* [sso_profile] — label/value pairs, stacking on narrow screens. */
.sso-profile-details {
    display: grid;
    grid-template-columns: minmax(7rem, max-content) 1fr;
    gap: 0.5rem 1rem;
    margin: 0;
    font-size: 0.875rem;
    color: #444;
}

.sso-profile-details dt {
    font-weight: 600;
    color: #222;
}

.sso-profile-details dd {
    margin: 0;
}

.sso-profile-subscription {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e2e2;
}

.sso-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.5;
    white-space: nowrap;
}

.sso-badge.verified {
    background: #e6f4ea;
    color: #1a6b34;
}

.sso-badge.unverified {
    background: #fdecea;
    color: #96271c;
}

@media (max-width: 480px) {
    .sso-profile-details {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .sso-profile-details dd {
        margin-bottom: 0.5rem;
    }
}
