
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    flex: 1;
    min-width: 0;
}

.form-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-dark-dark);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark-dark);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-control::placeholder {
    color: var(--text-dark-low);
    font-weight: 400;
    opacity: 0.7;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(41, 171, 226, 0.1);
    background: #fff;
    outline: none;
}

.form-control:hover:not(:focus) {
    border-color: #b0b8c4;
}

textarea.form-control {
    height: auto;
    min-height: 110px;
    padding: 12px 16px;
    resize: vertical;
    line-height: 1.5;
    font-family: 'DM Sans', sans-serif;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    position: relative;
}

.form-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.custom-select {
    position: relative;
    width: 100%;
    z-index: 1;
}

.custom-select * {
    pointer-events: auto;
}

.custom-select .custom-select-native {
    pointer-events: none !important;
}

.custom-select.open {
    z-index: 999999;
}

.custom-select-native {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -1 !important;
    overflow: hidden !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.custom-select .form-control {
    cursor: pointer;
    user-select: none;
    padding-right: 44px;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 48px;
    padding: 0 40px 0 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark-dark);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    user-select: none;
    z-index: 10 !important;
    pointer-events: auto !important;
    position: relative !important;
}

.custom-select-trigger.placeholder {
    color: var(--text-dark-low);
    font-weight: 400;
    opacity: 0.7;
}

.custom-select-trigger:hover {
    border-color: #b0b8c4;
}

.custom-select.open .custom-select-trigger {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(41, 171, 226, 0.1);
    outline: none;
}

.custom-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-dark-low);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-select.open .custom-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px;
    pointer-events: none;
}

.custom-select.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.custom-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-dark-dark);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    position: relative;
}

.custom-select-option:hover {
    background: rgba(41, 171, 226, 0.06);
    color: var(--secondary-color-dark);
}

.custom-select-option.selected {
    background: var(--secondary-color);
    color: #fff;
}

.custom-select-option.selected:hover {
    background: var(--secondary-color-dark);
}

.custom-select-option i {
    width: 20px;
    text-align: center;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.custom-select-option.selected i {
    color: #fff;
}

.custom-select-dropdown::-webkit-scrollbar {
    width: 5px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: var(--tertiary-color-dark);
    border-radius: 3px;
}

.form-hint {
    font-size: 0.76rem;
    color: var(--text-dark-low);
    margin-top: 2px;
}

/* KVKK Checkbox */
.form-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 8px;
}

.form-checkbox {
    position: relative;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.form-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.form-checkbox-label {
    position: relative;
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"]:checked + .form-checkbox-label {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.form-checkbox input[type="checkbox"]:checked + .form-checkbox-label::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
}

.form-checkbox input[type="checkbox"]:focus + .form-checkbox-label {
    box-shadow: 0 0 0 3px rgba(41, 171, 226, 0.1);
    border-color: var(--secondary-color);
}

.form-checkbox-text {
    flex: 1;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-dark);
    cursor: pointer;
}

.form-checkbox-text a {
    color: var(--secondary-color);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.form-checkbox-text a:hover {
    color: var(--secondary-color-dark);
}

.form-checkbox-group.error .form-checkbox-label {
    border-color: #dc3545;
}

.form-checkbox-group.error .form-checkbox-text {
    color: #dc3545;
}

@media (max-width: 1024px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-row,
    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .form-control,
    .custom-select-trigger {
        height: 50px;
        font-size: 0.9rem;
        padding: 0 16px;
    }

    .custom-select-trigger {
        position: relative !important;
        z-index: 10 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }

    .custom-select {
        pointer-events: auto !important;
    }

    .custom-select-native {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        position: absolute !important;
        z-index: -1 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        top: -9999px !important;
        left: -9999px !important;
    }

    textarea.form-control {
        min-height: 100px;
    }

    .form-checkbox-group {
        gap: 10px;
    }

    .form-checkbox {
        width: 18px;
        height: 18px;
    }

    .form-checkbox-label {
        width: 18px;
        height: 18px;
    }

    .form-checkbox-text {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}
