/* Main Container trackstyle.css */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, rgba(0, 51, 102, 0.8), rgba(0, 119, 182, 0.6)), url('../assets/background.png') no-repeat center center;
    background-size: cover;
    padding: 20px;
    padding-bottom: 50px; /* Add padding at bottom for scrolling */
}

/* Overlay */
.bg-black {
    padding: 40px;
    border-radius: 15px;
    color: white;
    margin-bottom: 20px;
    width: 90%;
    max-width: 800px;
}

.form-container {
    margin: 20px auto; /* Centers the form horizontally */
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.form-container label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
}

.form-container .flex {
    display: flex; /* Ensure input and button align properly */
    justify-content: center;
}

.form-container input {
    width: 70%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
}

.form-container button {
    width: 30%;
    padding: 12px;
    background-color: #0077B6;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.form-container button:hover {
    background-color: #2095d3;
}


        .flex {
            display: flex;
            width: 100%;
        }

        /* Results Container */
        .results-container {
            width: 100%;
            max-width: 1300px;
            overflow: hidden;
        }

        /* Search History */
        .search-history {
            width: 100%;
            margin-top: 20px;
        }

        /* Result Card */
        .result-card {
            background: white;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            margin-bottom: 20px;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .result-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
        }

        .result-header {
            background: linear-gradient(to right, #0077B6, #0056b3);
            color: white;
            padding: 15px 20px;
            border-radius: 10px 10px 0 0;
            text-align: left;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .result-header h3 {
            margin: 0;
            font-size: 1.5rem;
        }

        .result-header p {
            margin: 5px 0 0;
            font-size: 0.9rem;
            opacity: 0.9;
        }

        .result-header .close-btn {
            color: white;
            font-size: 1.2rem;
            cursor: pointer;
            opacity: 0.7;
            transition: opacity 0.3s;
        }

        .result-header .close-btn:hover {
            opacity: 1;
        }

        /* Clear All Button */
        .clear-all-btn {
            background-color: #ef4444;
            color: white;
            border: none;
            border-radius: 5px;
            padding: 10px 15px;
            cursor: pointer;
            font-weight: bold;
            margin-top: 10px;
            transition: background-color 0.3s;
            display: inline-block;
        }

        .clear-all-btn:hover {
            background-color: #c53030;
        }

        /* Table Styling */
        table {
            width: 100%;
            border-collapse: collapse;
            background: white;
        }

        /* Table Header */
        th {
            background-color: #f1f5f9;
            color: #333;
            font-weight: bold;
            text-align: left;
            padding: 14px 20px;
            border-bottom: 2px solid #e2e8f0;
        }

        /* Table Rows */
        td {
            padding: 12px 20px;
            border-bottom: 1px solid #e2e8f0;
            text-align: left;
        }

        /* Field Column */
        td:first-child {
            font-weight: 600;
            color: #4a5568;
            width: 30%;
        }

        /* Alternating Row Colors */
        tr:nth-child(even) {
            background-color: #f8f9fa;
        }

        /* Hover Effect */
        tr:hover {
            background-color: #e2e6ea;
            transition: 0.3s;
        }

        /* Status Badge - Updated with your permits.php color scheme */
        .status-badge {
            display: inline-block;
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 0.9em;
            font-weight: 500;
            text-align: center;
            min-width: 100px;
        }

        /* Status colors matching your permits.php implementation */
        .status-pending { 
            background: #898989; 
            color: #fff; 
        }
        
        .status-processing { 
            background: #FACC15; 
            color: #fff; 
        }
        
        .status-in-progress { 
            background: #FACC15; 
            color: #fff; 
        }
        
        .status-rejected { 
            background: #DC3545; 
            color: #fff; 
        }
        
        .status-cancelled { 
            background: #DC3545; 
            color: #fff; 
        }
        
        .status-completed { 
            background: #25C449; 
            color: #fff; 
        }
        
        .status-approved { 
            background: #25C449; 
            color: #fff; 
        }
        
        .status-claimed { 
            background: #023E8A; 
            color: #fff; 
        }
        
        .status-unclaimed {
            background: #E0E7FF;
            color: #4338CA;
        }
        
        /* No results */
        .no-results {
            background-color: #FEF2F2;
            border: 1px solid #FCA5A5;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            margin-top: 30px;
            width: 90%;
            max-width: 500px;
        }

        .no-results i {
            color: #DC2626;
            font-size: 2rem;
            margin-bottom: 10px;
        }

        .no-results h3 {
            color: #991B1B;
            font-size: 1.2rem;
            font-weight: bold;
            margin: 10px 0;
        }

        .no-results p {
            color: #7F1D1D;
            margin: 10px 0;
        }

        /* Table Styling */
.tracking-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tracking-table thead {
    background-color: #f1f5f9;
}

.tracking-table th {
    padding: 15px;
    text-align: left;
    color: #334155;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

.tracking-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
}

.tracking-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Button Styling */
.details-btn {
    background-color: #0077B6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s;
    display: flex;
    gap: 5px;
    align-items: center;

}

.details-btn:hover {
    background-color: #2095d3;
}

.remove-btn {
    display: flex;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.3s;
    align-items: center;
    gap: 5px;
}

.remove-btn:hover {
    background-color: #dc2626;
}

/* Details Row */
.details-row {
    background-color: #f8fafc;
}

.details-content {
    display: flex;
    flex-direction: row;
    padding: 15px;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table td {
    padding: 8px 15px;
    border-bottom: 1px solid #e2e8f0;
}

.details-table td:first-child {
    font-weight: 600;
    width: 30%;
    color: #475569;
}

/* Table wrapper for potential scrolling */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tracking-table th:nth-child(4),
    .tracking-table td:nth-child(4) {
        display: none;
    }
}

@media (max-width: 576px) {
    .tracking-table th:nth-child(2),
    .tracking-table td:nth-child(2) {
        display: none;
    }
}

.clear-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.clear-all-btn:hover {
    background-color: #dc2626; /* Slightly deeper red */
    transform: scale(1.03); /* Subtle zoom effect */
}


        /* Responsive Table */
        @media screen and (max-width: 600px) {
            table, tbody, tr, td, th {
                display: block;
                width: 100%;
            }

            th {
                text-align: center;
            }

            td {
                text-align: left;
                padding: 10px 15px;
                border: none;
            }

            td:first-child {
                background-color: #f1f5f9;
                color: #4a5568;
                font-weight: bold;
                padding-top: 15px;
                margin-top: 10px;
                border-radius: 5px 5px 0 0;
            }

            td:last-child {
                margin-bottom: 10px;
                border-bottom: 1px solid #e2e8f0;
                padding-bottom: 15px;
            }

            tr {
                margin-bottom: 10px;
            }
        }