/* ============================================================
   wttools.css — Shared stylesheet for Westechs Tools
   ============================================================ */

/* --- Base layout --- */
body {
    font-family: sans-serif;
    line-height: 1.6;
    max-width: 600px;
    margin: 16px auto;
    padding: 10px;
    background-color: #f9f9f9;
    color: #333;
    box-sizing: border-box;
}
@media (min-width: 500px) {
    body { margin: 40px auto; padding: 20px; }
    .container { padding: 30px; }
}

/* --- Container card --- */
.container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* --- Headings --- */
h2 {
    margin-top: 0;
    color: #00000;
}

/* --- Links --- */
a, a:visited {
    color: #007bff;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* --- Form inputs --- */
input[type="text"] {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* --- Buttons --- */
button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
}
button:hover {
    background-color: #0056b3;
}

/* --- Feedback messages --- */
.error {
    color: #dc3545;
    background: #f8d7da;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}
.success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* --- Result table (shared by mactool, numbertool, etc.) --- */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
}
.result-table th {
    text-align: left;
    padding: 12px;
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
}
.result-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}
.copy-row:hover td,
.copy-row:hover {
    background-color: #f1f1f1;
    cursor: pointer;
}

/* --- Clickable/copyable code cells --- */
.clickable-code {
    cursor: pointer;
    font-family: monospace;
    font-size: 1.1em;
    display: block;
    width: 100%;
    position: relative;
}
.clickable-code:hover::after {
    content: "Click to copy";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 0.8em;
    color: #888;
    font-family: sans-serif;
    font-weight: normal;
}
.copied-success {
    background-color: #d4edda !important;
    color: #155724;
    transition: background-color 0.2s;
}

/* --- Generic table --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
th {
    background: #007bff;
    color: #fff;
    text-align: left;
    padding: 10px 12px;
    font-size: 0.9rem;
}
td {
    padding: 9px 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f0f7ff; }

/* --- Code/monospace --- */
code {
    font-family: monospace;
    font-size: 0.85rem;
    color: #555;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: bold;
    text-transform: uppercase;
}
.badge-active   { background: #d4edda; color: #155724; }
.badge-inactive { background: #f8d7da; color: #721c24; }
.badge-other    { background: #e2e3e5; color: #383d41; }
.badge-yes      { background: #d4edda; color: #155724; }
.badge-no       { background: #f8d7da; color: #721c24; }

/* --- Misc shared utilities --- */
.null { color: #bbb; }
.meta { font-size: 0.8rem; color: #888; margin-top: 14px; }

.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-weight: bold; }

/* --- Search input wrap (listconnections) --- */
.search-wrap { margin-top: 16px; position: relative; }
.search-wrap input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.92rem;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.search-wrap input:focus { outline: none; border-color: #007bff; }
.search-wrap .icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}
#no-results { display: none; color: #888; font-size: 0.88rem; padding: 10px 0 4px; }
