/* TavernWall v6.3.26 Profile Theme Controls Fix */

/* Make color pickers look like real controls, not tiny thin lines */
.theme-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
}

.theme-control {
    display: grid;
    gap: 7px;
    font-weight: 900;
}

.theme-control input[type="color"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 4px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255,217,85,.42) !important;
    background: rgba(0,0,0,.28) !important;
    cursor: pointer;
}

.theme-control input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.theme-control input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 10px;
}

.theme-control input[type="color"]::-moz-color-swatch {
    border: 0;
    border-radius: 10px;
}

.profile-theme-editor {
    --profile-bg: #2b2b2b;
    --profile-accent: #8b6f4e;
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(255,217,85,.22);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--profile-accent), transparent 75%), transparent 40%),
        color-mix(in srgb, var(--profile-bg), #000 16%);
}

.theme-preview-card {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--profile-accent);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--profile-bg), #000 8%), color-mix(in srgb, var(--profile-accent), #000 72%));
    color: #ead9ad;
}

.theme-preview-card h3 {
    margin: 0 0 6px;
    color: #ffd955;
}

.theme-preview-card p {
    margin: 0 0 10px;
}

.theme-preview-card span {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--profile-accent);
    color: #fff2c4;
    font-weight: 900;
}

/* Saved profile theme application */
.profile-theme-shell {
    --profile-bg: #2b2b2b;
    --profile-accent: #8b6f4e;
    padding: 1px;
    border-radius: 22px;
}

.profile-theme-shell > .card,
.profile-theme-shell .card {
    border-color: color-mix(in srgb, var(--profile-accent), #ffd955 20%) !important;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--profile-accent), transparent 82%), transparent 38%),
        linear-gradient(135deg, color-mix(in srgb, var(--profile-bg), #000 4%), color-mix(in srgb, var(--profile-bg), #000 28%)) !important;
}

.profile-theme-shell .card-title,
.profile-theme-shell h1,
.profile-theme-shell h2 {
    color: #ffd955;
    text-shadow: 0 2px 0 rgba(0,0,0,.35);
}

.profile-theme-shell .button,
.profile-theme-shell button,
.profile-theme-shell .mini-button {
    border-color: color-mix(in srgb, var(--profile-accent), #ffd955 25%) !important;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--profile-accent), #fff 12%), color-mix(in srgb, var(--profile-accent), #000 34%)) !important;
}

/* Font choices */
.profile-font-default {
    font-family: inherit;
}

.profile-font-medieval,
.profile-font-medieval .card-title,
.profile-font-medieval h1,
.profile-font-medieval h2,
.profile-font-medieval h3 {
    font-family: 'MedievalSharp', Georgia, serif !important;
}

.profile-font-cinzel,
.profile-font-cinzel .card-title,
.profile-font-cinzel h1,
.profile-font-cinzel h2,
.profile-font-cinzel h3 {
    font-family: Cinzel, Georgia, serif !important;
    letter-spacing: .02em;
}

.profile-font-serif,
.profile-font-serif .card-title,
.profile-font-serif h1,
.profile-font-serif h2,
.profile-font-serif h3 {
    font-family: Georgia, 'Times New Roman', serif !important;
}

.profile-font-clean,
.profile-font-clean .card-title,
.profile-font-clean h1,
.profile-font-clean h2,
.profile-font-clean h3 {
    font-family: Arial, Helvetica, sans-serif !important;
}

/* Keep current site color-input rows from shrinking */
input[name="theme_bg"],
input[name="theme_accent"] {
    min-height: 46px !important;
}

@media (max-width: 760px) {
    .theme-control-grid {
        grid-template-columns: 1fr;
    }
}
