/* Shared form styles for Proxylity */

body:has(form:nth-of-type(2)) form:focus-within {
    margin-left: -14px;
    border-left: 4px solid var(--card-background-color);
    padding-left: 10px;
}

.form-container {
    max-width: 600px;
    margin: 60px auto;
}

.form-card {
    background-color: var(--card-background-color);
    border: 1px solid var(--card-border-color);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 30px;
}

.form-card h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

.form-field {
    margin-bottom: 15px;
}

.form-field .row {
    display: flex;
    gap: .25em;
}

.form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    text-align: left;
}
.form-field button { margin-top: 0px; margin-bottom: 0px; }
.form-field input,
.form-field select,
.form-field option,
.form-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--card-border-color);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}
.form-field input[type="checkbox"] {
    width: 1.15em;
    height: 1.15em;
    margin-right: 0.25em;
    vertical-align: middle;
    accent-color: var(--text-color);
}
.form-field input[type="checkbox"] + span {
    vertical-align: middle;
}

.form-field textarea {
    min-height: 120px;
    resize: vertical;
}

.help-text {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    margin-top: -10px;
    margin-bottom: 15px;
}

.submit-button {
    width: 100%;
    padding: 15px;
    background-color: var(--button-background-color);
    color: var(--button-text-color);
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
}

.submit-button:hover {
    background-color: var(--button-hover-background-color);
    color: var(--text-color)
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.feature-list li {
    padding: 5px 0;
    color: var(--text-color);
}

.feature-list li::before {
    content: "✓ ";
    color: var(--button-background-color);
    font-weight: bold;
    margin-right: 5px;
}

.tag-editor {
    flex-wrap: wrap;
}
.tag {
    display: flex;
    align-items: center;
    background-color: var(--card-background-color);
    padding: .25em .75em .25em 1em;
    border-radius: .5em;
    pointer-events: none;
}
.tag:after {
    margin-left: .5em;
    padding: .15em .15em .15em .15em;
    content: "×";
    cursor: pointer;
    pointer-events: all;
}

dialog {
    border: none;
    background-color: var(--card-background-color);
    border-radius: .5em;
    width: 800px;
    max-height: 90%;
}
dialog::backdrop {
    background-color: color-mix(in srgb, var(--background-color), rgba(0,0,0,.5));
}
.filters {
    display: flex;
    gap: .5em;
    margin-bottom: 1em;
}