/**
 * LaborLawCenter Form Styles
 * Matches Magento 2 Porto child theme form elements
 */

/* ── Base Input ───────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="date"],
textarea,
select,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container .select2-selection--single {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-family: var(--llc-font-regular);
    font-size: var(--llc-font-sm);
    line-height: 1.5;
    color: var(--llc-brand-gray);
    background-color: var(--llc-white);
    border: 1px solid var(--llc-border-color);
    border-radius: var(--llc-radius-sm);
    outline: none;
    transition: var(--llc-transition);
    appearance: none;
    -webkit-appearance: none;
}

textarea {
    height: auto;
    min-height: 120px;
    padding: 12px 16px;
    resize: vertical;
}

select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234B5368' fill='none' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    cursor: pointer;
}

input:focus,
textarea:focus,
select:focus,
.woocommerce form .form-row input.input-text:focus {
    border-color: var(--llc-light-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: var(--llc-gray-bbb);
}

/* ── Labels ───────────────────────────────────────── */
label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--llc-font-medium);
    font-size: var(--llc-font-sm);
    color: var(--llc-brand-blue);
}

.required label::after,
label .required {
    color: var(--llc-error);
    content: ' *';
}

/* ── Checkbox / Radio ─────────────────────────────── */
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--llc-light-blue);
    cursor: pointer;
    vertical-align: middle;
}

/* ── Quantity Controls ────────────────────────────── */
.qty-con-1k {
    display: flex;
    align-items: center;
    border: 1px solid var(--llc-border-color);
    border-radius: var(--llc-radius-md);
    overflow: hidden;
}

.qty-con-1k input[type="button"] {
    background-color: var(--llc-white);
    border: none;
    border-radius: var(--llc-radius-full);
    width: 30px;
    height: 30px;
    color: var(--llc-brand-blue);
    font-size: 22px;
    line-height: 28px;
    cursor: pointer;
    padding: 0;
    transition: var(--llc-transition);
}

.qty-con-1k input[type="button"].qStepDown {
    font-size: 16px;
    line-height: 26px;
}

.qty-con-1k input[type="button"]:hover {
    background-color: var(--llc-light-gray);
}

.qty-con-1k input[type="number"] {
    background-color: var(--llc-white);
    border: none;
    font-size: var(--llc-font-base);
    font-weight: 600;
    color: var(--llc-brand-blue);
    width: 40px;
    height: 30px;
    text-align: center;
    padding: 0;
    pointer-events: none;
    -moz-appearance: textfield;
}

.qty-con-1k input[type="number"]::-webkit-inner-spin-button,
.qty-con-1k input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* ── Search Form ──────────────────────────────────── */
.search-area {
    position: relative;
}

.search-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--llc-brand-blue);
    font-size: var(--llc-font-lg);
    cursor: pointer;
    transition: var(--llc-transition);
}

.search-toggle-icon:hover {
    color: var(--llc-light-blue);
}

.search-form-container {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    width: 360px;
    background: var(--llc-white);
    border: 1px solid var(--llc-border-color);
    border-radius: var(--llc-radius-md);
    padding: 16px;
    box-shadow: var(--llc-shadow-lg);
    z-index: var(--llc-z-dropdown);
}

.search-form-container.active {
    display: block;
}

.search-form-container input[type="search"] {
    height: 44px;
    padding-right: 48px;
}

.search-form-container button[type="submit"] {
    position: absolute;
    right: 24px;
    top: 24px;
    background: none;
    border: none;
    color: var(--llc-brand-blue);
    padding: 8px;
}

/* ── Form Groups ──────────────────────────────────── */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row > * {
    flex: 1;
}

/* ── Validation States ────────────────────────────── */
.input-error,
.woocommerce-invalid input {
    border-color: var(--llc-error) !important;
}

.input-success {
    border-color: var(--llc-success) !important;
}

.error-message {
    color: var(--llc-error);
    font-size: var(--llc-font-xs);
    margin-top: 4px;
}
