/* style.css
 * Global stylesheet for the Phone Number Generator web application.  This
 * file defines the visual presentation of the login screen, navigation
 * sidebar, data tables, forms, and other UI components.  The goal is
 * to provide a clean, modern look with clear typography and intuitive
 * layout.
 */

/* Reset some basic elements */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    color: #333;
    background-color: #f5f7fa;
    line-height: 1.4;
}

a {
    color: inherit;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Login page styles */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f2f5;
}

.login-container {
    background: #fff;
    padding: 2rem 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo img {
    display: block;
    margin: 0 auto 1rem;
}

.login-container h1 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

.error-message {
    color: #dc3545;
    margin-bottom: 1rem;
}

/* Application layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background-color: #1d2533;
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.sidebar-header img {
    margin-right: 0.5rem;
}

.app-title {
    font-size: 1.2rem;
    font-weight: bold;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 1rem;
}

.sidebar-nav li a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.sidebar-nav li.active a,
.sidebar-nav li a:hover {
    background-color: #2e3a56;
}

/* Main content styles */
.main-content {
    flex-grow: 1;
    padding: 2rem;
    overflow-x: auto;
}

/* Table styles */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1rem;
}

table thead {
    background-color: #007bff;
    color: #fff;
}

table thead th {
    padding: 0.75rem;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 2;
}

table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

table tbody td {
    padding: 0.5rem;
    border-bottom: 1px solid #e1e5eb;
}

table tbody tr:hover {
    background-color: #eef3fc;
}

/* Search inputs */
.search-row input {
    width: 100%;
    padding: 0.35rem;
    font-size: 0.9rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* Buttons row */
.actions {
    margin-bottom: 1rem;
}

.actions button {
    margin-right: 0.5rem;
}

.actions a.button {
    padding: 0.5rem 1rem;
    background-color: #28a745;
    color: #fff;
    border-radius: 4px;
}

.actions a.button:hover {
    background-color: #218838;
}

/* Responsive tables: allow horizontal scrolling on narrow screens */
.table-responsive {
    overflow-x: auto;
}
thead tr:nth-child(2) th {
    background: #f9f9f9;
    padding: 2px;
    vertical-align: top;
    color: #000; /* make font color black */
}

thead div.filter-box {
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.8rem;
    color: #000; /* make checkbox label text black */
}
.dataTables_processing {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    position: fixed !important;
    z-index: 9999 !important;
    background: transparent !important;  /* ✅ remove box */
    border: none !important;             /* ✅ no border */
    padding: 0 !important;               /* ✅ no padding */
    box-shadow: none !important;         /* ✅ no shadow */
    font-weight: bold;
    color: #000;
}
/* Default filter-box */
thead div.filter-box {
    max-height:200px;
    overflow-y:auto;
    background:#f9f9f9;
    border:1px solid #ddd;
    padding:3px;
    font-size:.85rem;
    color:#000;
}

/* Compact grid for NPA, NXX, Block */
thead div.filter-box[data-col="1"],
thead div.filter-box[data-col="2"],
thead div.filter-box[data-col="3"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    max-height:120px; /* smaller box */
    overflow-y:auto;
}

thead div.filter-box[data-col="1"] label,
thead div.filter-box[data-col="2"] label,
thead div.filter-box[data-col="3"] label {
    display:inline-block;
    margin-right:5px;
    white-space:nowrap;
}
/* Style for all filter checkboxes */
thead div.filter-box label {
    display: flex;
    align-items: center;
    gap: 4px;               /* space between checkbox and text */
    cursor: pointer;
    padding: 2px 0;
}

thead div.filter-box input[type="checkbox"] {
    margin: 0;              /* remove browser default spacing */
    flex-shrink: 0;         /* keep checkbox from shrinking */
}


