﻿.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.cat-btn {
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

    .cat-btn:hover, .cat-btn.selected {
        border-color: #007bff;
        background: #f0f7ff;
    }
/* 1. Main Container */
.app-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 15px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* 2. The Card Style */
.form-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

    .form-card h3 {
        margin-top: 0;
        font-size: 1.1rem;
        color: #333;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }

/* 3. The Responsive Row (Side-by-Side on Desktop) */
.input-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allows stacking on mobile */
}

.form-group {
    display: flex;
    flex-direction: column; /* Stack Label on top of Input */
    gap: 8px; /* Space between Label and Input */
}

.checkbox-group {
    font-size: 0.75rem;
    font-weight: 700;
}

    /* Styling the label to be subtle but helpful */
    .form-group label {
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        color: #718096; /* Soft blue-gray */
        letter-spacing: 0.5px;
        margin-bottom: 4px;
    }

/* Making the actual select box the visual focus */
.form-control {
    border: 1px solid #e2e8f0;
    color: #2d3748;
    font-size: 1rem;
    padding: 10px;
}

    .input-row .form-group {
        flex: 1;
        min-width: 250px; /* Forces stack on narrow screens */
    }


input[type="date"],
input[type="time"] {
    min-height: 46px; /* Adjust based on your preferred padding */
    font-family: inherit; /* Prevents browser default font override */
}

/* 4. Controls */
.form-control, select, input[type="text"], input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Essential for sizing */
}

/* 5. GPS Button Logic */
.input-with-button {
    display: flex;
    gap: 5px;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
}

/* The wrapper for the highlighted category */
.category-highlight-bar {
    background-color: #f0f7ff; /* Very light blue tint */
    border-left: 5px solid #2b6cb0; /* Strong blue accent */
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}

.category-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4a5568; /* Subtle gray */
    font-weight: bold;
}

#display-parent-name {
    margin: 0;
    font-size: 1.4rem;
    color: #2b6cb0; /* The "Primary" highlight color */
    font-weight: 800;
}

/* Force children to stay side-by-side */
.row-tight {
    flex-wrap: nowrap !important;
    gap: 10px; /* Smaller gap for mobile screens */
}

    /* Override the 250px min-width for this specific row */
    .row-tight .form-group {
        flex: 1 1 50%; /* Grow and shrink equally, starting at 50% */
        min-width: 0 !important;
    }

.spinner-blue {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@media screen and (max-width: 600px) {
    .form-card {
        padding: 10px;
        margin-bottom: 5px;
    }

    .input-row{
        gap:5px;
    }

    h3 {
        font-size: 0.9rem;
    }

    .display-parent-name {
        font-size: 0.8em;
    }

    input[type="date"],
    input[type="time"] {
        min-height: 30px; 
    }

    .form-card h3 {
        margin-top: 0;
        font-size: 0.6em;
        padding-bottom: 5px;
        margin-bottom: 5px;
        text-align: left;
    }

    .category-highlight-bar {
        margin-bottom: 0px;
        padding: 5px 15px;
    }

    .form-control {
        font-size: 0.7em;
    }

    .form-control, select, input[type="text"], input[type="tel"] {
        padding:5px;
    }

    .form-group label{
        margin-top:5px;
    }
}