/* Shortcode Common Styles — Bauhaus Design System
 *
 * Shared styles for all interactive shortcodes.
 * To update toggle/header/input/button styling globally, edit only this file.
 *
 * Class prefix: sc-
 */

/* Container */
.sc-wrap {
    margin: 1.5em 0;
}

/* Collapsible toggle header (button) */
.sc-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--ink, #1A1918);
    color: var(--white, #F2F0EB);
    border: var(--border-weight, 3px) solid var(--ink, #1A1918);
    cursor: pointer;
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.15s ease;
    width: 100%;
    text-align: left;
    border-radius: 0;
}

.sc-toggle:hover {
    background: var(--red, #D03020);
    border-color: var(--red, #D03020);
    box-shadow: 4px 4px 0 var(--ink, #1A1918);
}

.sc-toggle:active {
    transform: scale(0.98);
    box-shadow: none;
}

.sc-toggle__arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.8em;
}

.sc-wrap--open .sc-toggle__arrow {
    transform: rotate(90deg);
}

.sc-toggle__text {
    flex: 1;
}

.sc-toggle__hint {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 1px;
    opacity: 0.7;
    text-transform: uppercase;
}

/* Static header (non-collapsible) */
.sc-header {
    padding: 14px 20px;
    background: var(--ink, #1A1918);
    color: var(--white, #F2F0EB);
    border: var(--border-weight, 3px) solid var(--ink, #1A1918);
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* When sc-header is followed by sc-body (static block), add border to the body */
.sc-header + .sc-body {
    border: var(--border-weight, 3px) solid var(--ink, #1A1918);
    border-top: none;
}

/* Collapsible content area */
.sc-collapsible {
    display: none;
    border: var(--border-weight, 3px) solid var(--ink, #1A1918);
    border-top: none;
}

.sc-wrap--open .sc-collapsible {
    display: block;
}

/* Content body */
.sc-body {
    background: var(--cream, #E8E4DC);
    padding: var(--gap, 24px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sc-body__subtitle {
    font-size: 0.85rem;
    color: var(--secondary, #7A7672);
    margin: 0 0 20px 0;
}

/* Form fields */
.sc-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.sc-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 100px;
}

.sc-field--full {
    flex-basis: 100%;
    min-width: 100%;
    margin-bottom: 20px;
}

.sc-field > label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary, #7A7672);
    margin-bottom: 6px;
}

/* Input group (input + unit suffix) */
.sc-input-group {
    display: flex;
    border: var(--border-weight, 3px) solid var(--ink, #1A1918);
    background: var(--theme, #F2F0EB);
    transition: border-color 0.15s ease;
}

.sc-input-group:focus-within {
    border-color: var(--red, #D03020);
}

.sc-input-group input[type="number"],
.sc-input-group input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    font-size: 16px;
    border: none;
    background: transparent;
    color: var(--primary, #1A1918);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    outline: none;
    -moz-appearance: textfield;
}

.sc-input-group input[type="number"]::-webkit-outer-spin-button,
.sc-input-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sc-unit {
    padding: 8px 10px;
    background: var(--concrete, #D1CCC4);
    border-left: var(--border-weight, 3px) solid var(--ink, #1A1918);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--secondary, #7A7672);
    white-space: nowrap;
    transition: border-color 0.15s ease;
}

.sc-input-group:focus-within .sc-unit {
    border-left-color: var(--red, #D03020);
}

/* Select dropdown */
.sc-select-wrap {
    position: relative;
}

.sc-select-wrap::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--primary, #1A1918);
    pointer-events: none;
}

.sc-select-wrap select {
    width: 100%;
    padding: 10px 40px 10px 12px;
    font-size: 15px;
    border: var(--border-weight, 3px) solid var(--ink, #1A1918);
    border-radius: 0;
    background: var(--theme, #F2F0EB);
    color: var(--primary, #1A1918);
    font-family: 'Inter', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease;
}

.sc-select-wrap select:focus {
    border-color: var(--red, #D03020);
}

/* Action button */
.sc-btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--ink, #1A1918);
    color: var(--white, #F2F0EB);
    border: var(--border-weight, 3px) solid var(--ink, #1A1918);
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s ease;
}

.sc-btn:hover {
    background: var(--red, #D03020);
    border-color: var(--red, #D03020);
    color: #fff;
    box-shadow: 4px 4px 0 var(--ink, #1A1918);
}

.sc-btn:active {
    transform: scale(0.96);
    box-shadow: none;
}

/* Mobile */
@media (max-width: 500px) {
    .sc-toggle {
        font-size: 1rem;
        padding: 12px 16px;
        letter-spacing: 2px;
    }
    .sc-header {
        font-size: 1rem;
        padding: 12px 16px;
        letter-spacing: 2px;
    }
    .sc-body {
        padding: 16px;
    }
    .sc-fields {
        flex-direction: column;
        gap: 12px;
    }
    .sc-field {
        min-width: 100%;
    }
    .sc-btn {
        width: 100%;
        text-align: center;
    }
}
