﻿/* =====================================================
   FORMS.CSS - Form Components
   ===================================================== */

/* ==================== FORM GROUPS ==================== */
.form-group {
    margin-bottom: 28px;
}

    .form-group label {
        display: block;
        font-family: "Inter", sans-serif;
        font-weight: 600;
        font-size: 1rem;
        color: var(--text-color, #333);
        margin-bottom: 10px;
        cursor: pointer;
    }

/* ==================== FORM INPUTS ==================== */
.form-input,
.form-control,
.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-input {
    height: 56px;
    background-color: var(--input-bg, #f5f5f5);
    border: 2px solid transparent;
    border-radius: var(--input-radius, 15px);
    padding: 0 20px;
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    color: var(--text-color, #333);
    transition: var(--transition, all 0.3s ease);
}

    .form-input::placeholder,
    .form-control::placeholder {
        color: var(--light-text, rgba(0, 0, 0, 0.5));
    }

    .form-input:focus,
    .form-control:focus {
        outline: none;
        border-color: #d32f2f;
        box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
    }

    .form-input:focus {
        border-color: var(--secondary-color, #7f7bee);
        background-color: #ffffff;
        box-shadow: 0 0 0 4px rgba(127, 123, 238, 0.1);
    }

.form-control:read-only {
    background: #f8f9fa;
    cursor: not-allowed;
}

/* ==================== FORM TEXTAREA ==================== */
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

    .form-textarea:focus {
        border-color: #d32f2f;
        box-shadow: 0 0 0 3px rgba(211,47,47,0.1);
        outline: none;
    }

/* ==================== SELECT INPUTS ==================== */
select,
.filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff;
}

    select:focus,
    .filter-select:focus {
        outline: none;
        border-color: #d32f2f;
        box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
    }

#promotionSelect {
    background: #fff;
    cursor: pointer;
}

/* ==================== SEARCH BOX ==================== */
.search-box {
    flex: 1;
    position: relative;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s;
}

    .search-input:focus {
        outline: none;
        border-color: #d32f2f;
        box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
    }

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #999;
}

/* ==================== INPUT WRAPPER ==================== */
.input-wrapper {
    position: relative;
}

/* ==================== QUANTITY INPUTS ==================== */
.qty-input {
    width: 45px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    height: 30px;
}

.qty-input {
    width: 60px;
    height: 45px;
    border: none;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

    .qty-input:focus {
        outline: none;
    }

/* ==================== QUANTITY SELECTOR ==================== */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    overflow: hidden;
    background: white;
}

/* ==================== ITEM QUANTITY ==================== */
.item-quantity {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==================== FORM ACTIONS ==================== */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* ==================== FORM ROW ==================== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ==================== FILTER CHECKBOX ==================== */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

    .filter-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

/* ==================== ORDER TYPE SELECTOR ==================== */
.order-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.order-type-option {
    position: relative;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
    background: #fff;
}

    .order-type-option:hover {
        border-color: #3498db;
        background: #f0f8ff;
    }

    .order-type-option.active {
        border-color: #3498db;
        background: #e3f2fd;
    }

    .order-type-option input[type="radio"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .order-type-option .option-content {
        display: block;
        text-align: center;
    }

        .order-type-option .option-content strong {
            display: block;
            font-size: 1.05rem;
            color: #333;
            margin-bottom: 5px;
        }

        .order-type-option .option-content small {
            display: block;
            color: #666;
            font-size: 0.85rem;
        }

/* ==================== AREA OPTIONS ==================== */
.area-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.area-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    border: 2px solid #f0f0f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

    .area-option:hover {
        border-color: #e57373;
        background: #fff8f8;
    }

    .area-option input[type="radio"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

        .area-option input[type="radio"]:checked + .area-content {
            border-color: #d32f2f;
            background: #fff0f0;
        }

.area-content {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.area-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.area-info h4 {
    margin: 0;
    color: #d32f2f;
    font-weight: 700;
}

.area-info p {
    margin: 3px 0 0;
    font-size: 0.9rem;
    color: #666;
}

/* ==================== TIME SLOTS ==================== */
.time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.time-slot {
    background: #f4f4f4;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 8px 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

    .time-slot:hover {
        background: #ffe5e5;
    }

    .time-slot.active {
        background: #d32f2f;
        color: white;
        border-color: #b71c1c;
    }

.time-slots {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.time-slot {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

    .time-slot:hover {
        border-color: #ff9800;
        transform: translateY(-2px);
    }

    .time-slot.active {
        background: #d32f2f;
        color: white;
        border-color: #d32f2f;
    }

/* ==================== SEARCH FILTER BAR ==================== */
.search-filter-bar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ==================== FILTER PANEL ==================== */
.filter-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filter-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.filter-group h4 {
    color: #d32f2f;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* ==================== ACCESSIBILITY ==================== */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--secondary-color, #7f7bee);
    outline-offset: 2px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .search-filter-bar {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .filter-content {
        grid-template-columns: 1fr;
    }

    .order-type-selector {
        grid-template-columns: 1fr;
    }

    .time-slots {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .form-input {
        height: 52px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
}
