/* 
 * EPIC FORMS SYSTEM - AVALON HOMESTEAD (REFINED)
 * Premium glassmorphism and glowing interactions.
 */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
}

/* Label Styling - Clean & Elegant */
label {
    display: inline-block;
    font-size: 13px;
    color: var(--primary2);
    font-weight: 700;
    margin-bottom: 10px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
}

/* Base Input, Textarea & Select Styling */
/* Base Input, Textarea & Select Styling */
input,
textarea,
select {
    width: 100%;
    padding: 14px 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: rgba(10, 14, 13, 0.6) !important;
    backdrop-filter: blur(24px);
    color: var(--text) !important;
    font-size: 16px;
    font-weight: 500;
    outline: none !important;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    letter-spacing: 0.4px;
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Epic Focus State - Deep Inner Glow & Primary Border */
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(143, 217, 168, 0.7) !important;
    background: rgba(12, 16, 15, 0.95) !important;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(143, 217, 168, 0.2),
        inset 0 0 15px rgba(143, 217, 168, 0.05) !important;
    transform: none !important;
}

/* Input Group Styling Override (e.g. Players Search) */
.input-group-text {
    background: rgba(10, 14, 13, 0.6) !important;
    border: 0px !important;
    color: var(--primary2) !important;
    border-radius: 18px 0 0 18px !important;
    padding: 14px 10px 14px 20px !important;
    display: flex;
    align-items: center;
}

.input-group .form-control {
    border: 0 !important;
    /* Trick to keep layout but hide visual border */
    border-radius: 0 18px 18px 0 !important;
    padding-left: 10px !important;
    background: rgba(10, 14, 13, 0.6) !important;
}

/* Ensure seamless focus state for the group */
.input-group:focus-within .input-group-text {
    border-color: rgba(143, 217, 168, 0.7) !important;
    background: rgba(12, 16, 15, 0.95) !important;
    color: var(--primary2) !important;
    transition: all 0.4s ease;
}

.input-group .form-control:focus {
    box-shadow: none !important;
    border-color: rgba(143, 217, 168, 0.7) !important;
    border-left-color: transparent !important;
    background: rgba(12, 16, 15, 0.95) !important;
}

/* Leaderboard skill picker uses the surrounding search shell as the visual input */
.leaderboard-skill-picker__search .leaderboard-skill-picker__input,
.leaderboard-skill-picker__search .leaderboard-skill-picker__input:hover,
.leaderboard-skill-picker__search .leaderboard-skill-picker__input:focus,
.leaderboard-skill-picker__search .leaderboard-skill-picker__input:active {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    color: var(--text) !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

.leaderboard-skill-picker__search .leaderboard-skill-picker__input::placeholder {
    color: var(--muted) !important;
}

/* Placeholder Brightening */
::placeholder {
    color: rgba(232, 237, 235, 0.5) !important;
    opacity: 1;
    /* Firefox */
}

:-ms-input-placeholder {
    color: rgba(232, 237, 235, 0.5) !important;
}

::-ms-input-placeholder {
    color: rgba(232, 237, 235, 0.5) !important;
}

/* Native Dropdown Options Styling - Keep it simple for stability */
select option {
    background-color: #1a1a1a !important;
    /* Slightly lighter than bg for contrast */
    color: var(--text) !important;
    padding: 15px;
}

/* Custom Select Trigger - The part the user sees first */
select {
    appearance: none;
    background: rgba(8, 12, 11, 0.75) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%238FD9A8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat calc(100% - 24px) center / 14px !important;
    padding-right: 60px !important;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

select:focus {
    background: rgba(8, 12, 11, 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%238FD9A8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 4.86 12.043 10.342c.566.645.106 1.658-.753 1.658H1.698a1 1 0 0 1-.753-1.659l4.796-5.48a1 1 0 0 1 1.506 0z'/%3E%3C/svg%3E") no-repeat calc(100% - 24px) center / 14px !important;
}

/* Input with Icon Wrapper */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    right: 20px;
    color: var(--primary2);
    opacity: 0.4;
    pointer-events: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.input-with-icon input {
    padding-right: 52px;
}

.input-with-icon input:focus+i {
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--primary2));
}

/* Epic Checkbox Styling */
.form-check {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 12px;
    padding: 15px;
    border-radius: 16px;
    transition: background 0.3s ease;
}

.form-check:hover {
    background: rgba(255, 255, 255, 0.03);
}

.form-check input[type="checkbox"] {
    appearance: none;
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.form-check input[type="checkbox"]:checked {
    background: rgba(79, 138, 107, 0.2) !important;
    border-color: var(--primary2) !important;
    box-shadow: 0 0 20px rgba(143, 217, 168, 0.3);
}

.form-check input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 7 Pro';
    font-weight: 900;
    font-size: 14px;
    color: var(--primary2);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 5px var(--primary));
}

/* Textarea specific */
textarea {
    min-height: 140px;
    resize: vertical;
}

/* Form Actions */
.form-actions {
    margin-top: 40px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* Chrome Autocomplete Override */
input:-webkit-autofill {
    -webkit-text-fill-color: var(--text) !important;
    -webkit-box-shadow: 0 0 0px 1000px #0c100f inset !important;
    border-radius: 18px;
}

/* Validation Styling */
.is-invalid {
    border-color: rgba(255, 77, 77, 0.5) !important;
}

.invalid-feedback {
    display: block;
    font-size: 11px;
    color: #ff4d4d;
    margin-top: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-left: 5px;
}

/* Auth Pages */
.btn:disabled,
.btn.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.auth-input-group .input-group-text,
.auth-input-group .form-control {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.auth-input-group .form-control:focus {
    border-color: var(--primary2) !important;
    box-shadow: 0 0 0 0.25rem rgba(143, 217, 168, 0.25);
}

.auth-input-group:focus-within .input-group-text {
    border-color: var(--primary2) !important;
    color: var(--primary2) !important;
}

.otp-input {
    font-size: 1.5rem;
    letter-spacing: 5px;
}

.otp-input-limited {
    margin-left: auto;
    margin-right: auto;
    max-width: 200px;
}

.twofa-qr-image {
    max-width: 200px;
}
