/* ============================= */
/* Common Form Styles */
/* ============================= */

/* ============================= */
/* Form Container */
.form-group {
    position: relative;
    margin: 20px 0;
    width: 100%;
}

/* ============================= */
/* Input & Textarea */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid var(--secondary);
    border-radius: 8px;
    background-color: var(--ivory);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--shadow-primary);
}

/* ============================= */
/* Floating Labels */
label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--gunmetal);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
    background-color: var(--ivory);
    padding: 0 4px;
}

input:focus+label,
input:not(:placeholder-shown)+label,
textarea:focus+label,
textarea:not(:placeholder-shown)+label {
    top: -10px;
    left: 12px;
    font-size: 12px;
    color: var(--primary);
}

/* Textarea Resize */
textarea {
    resize: vertical;
    min-height: 80px;
}

/* ============================= */
/* Checkbox & Radio */
.checkbox-group,
.radio-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    transition: transform 0.2s ease;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
    transform: scale(1.2);
}

.checkbox-group label,
.radio-group label {
    font-size: 16px;
    color: var(--gunmetal);
    cursor: pointer;
}

/* ============================= */
/* Responsive */
@media (max-width: 768px) {

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    textarea {
        padding: 12px 14px;
        font-size: 14px;
    }

    label {
        font-size: 14px;
    }
}

/* ============================= */
/* Smooth input animations */
input,
textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
