/*
 * [summoners_war_redeem_code] form styles.
 *
 * Inherits GeneratePress typography via var(--gp-*). Uses the same accent
 * tokens defined in the child theme's style.css so the form matches the
 * coupon table's "Copy" button.
 */

.swc-redeem {
    margin: 2em 0;
    padding: 1.25em;
    /* Match the coupon table outline: 1px accent border + soft elevation.
     * Explicit border-bottom guards against parent themes that strip the
     * shorthand on container elements. */
    border: 1px solid #0d6efd !important;
    border-bottom: 1px solid #0d6efd !important;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    background: var(--gp-content-background-color, #fff);
    font-family: var(--gp-font-family-body, inherit);
    color: var(--gp-text-color, inherit);
}

.swc-redeem-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75em;
    align-items: end;
}

.swc-field {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}

.swc-field label {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--gp-text-color, #111);
}

.swc-redeem-form select,
.swc-redeem-form input[type="text"] {
    width: 100%;
    padding: 0.55em 0.75em;
    border: 1px solid var(--swc-border, #e5e7eb);
    border-radius: 4px;
    background: var(--gp-background-color, #fff);
    color: var(--gp-text-color, inherit);
    font-size: var(--gp-font-size-body, 1rem);
    font-family: inherit;
    line-height: 1.4;
    box-sizing: border-box;
}

.swc-redeem-form select:focus,
.swc-redeem-form input[type="text"]:focus {
    outline: 2px solid var(--swc-accent, #4a8df7);
    outline-offset: 1px;
    border-color: var(--swc-accent, #4a8df7);
}

.swc-redeem-btn {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 0.6em 1em;
    border: 0;
    border-radius: 4px;
    background: var(--swc-accent, #4a8df7);
    color: #fff;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.swc-redeem-btn:hover,
.swc-redeem-btn:focus {
    background: var(--swc-accent-strong, #2563eb);
    outline: 0;
}

.swc-redeem-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.swc-redeem-message {
    margin-top: 1em;
    padding: 0.75em 1em;
    border-radius: 6px;
    font-size: 0.95em;
    line-height: 1.5;
}

.swc-redeem-message.is-success {
    background: rgba(22, 163, 74, 0.12);
    border: 1px solid var(--swc-success, #16a34a);
    color: var(--swc-success, #16a34a);
}

.swc-redeem-message.is-error {
    background: rgba(185, 28, 28, 0.08);
    border: 1px solid var(--swc-danger, #b91c1c);
    color: var(--swc-danger, #b91c1c);
}

.swc-redeem-hint {
    margin-top: 1em;
    margin-bottom: 0;
    font-size: 0.85em;
    color: var(--swc-muted, #6b7280);
}

/* Privacy / security disclaimer ---------------------------------------------- */

.swc-redeem-disclaimer {
    margin-top: 1em;
    padding-top: 0.85em;
    border-top: 1px dashed var(--swc-border, #e5e7eb);
    font-size: 0.8em;
    color: var(--swc-muted, #6b7280);
    line-height: 1.55;
}

.swc-redeem-disclaimer-title {
    margin: 0 0 0.4em;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gp-text-color, #374151);
}

.swc-redeem-disclaimer-list {
    margin: 0;
    padding-left: 1.1em;
    list-style: disc;
}

.swc-redeem-disclaimer-list li + li {
    margin-top: 0.35em;
}

.swc-redeem-disclaimer-list code {
    padding: 0.05em 0.35em;
    border-radius: 3px;
    background: rgba(13, 110, 253, 0.08);
    color: #0d6efd;
    font-size: 0.95em;
}

/* "Use" link in the coupon table — sits next to the Copy button. */
.swc-use-link {
    display: inline-block;
    padding: 0.3em 0.7em;
    margin-left: 0.35em;
    border-radius: 4px;
    background: transparent;
    color: var(--swc-accent, #4a8df7);
    border: 1px solid var(--swc-accent, #4a8df7);
    font-size: 0.85em;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.15s ease, color 0.15s ease;
}

.swc-use-link:hover,
.swc-use-link:focus {
    background: var(--swc-accent, #4a8df7);
    color: #fff;
    text-decoration: none;
}

/* Responsive: stack form fields on narrow screens. */
@media (max-width: 720px) {
    .swc-redeem-form {
        grid-template-columns: 1fr;
    }
}
