/* Simple, clean styles for rssCloud Server */

* {
    box-sizing: border-box;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
        Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
}

h1 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h2 {
    color: #34495e;
    margin-top: 30px;
}

p {
    margin-bottom: 15px;
}

/* Navigation and links */
ul {
    list-style-type: none;
    padding: 0;
}

li {
    margin-bottom: 10px;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Forms */
form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type='text'] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 16px;
}

button {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #2980b9;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

tr:hover {
    background-color: #f5f5f5;
}

/* Stats-specific styles */
.stats-table td:last-child,
.stats-table th:last-child {
    width: 120px;
    text-align: right;
}

.stats-table .toggle-row td {
    background-color: #f8f9fa;
    text-align: center;
    width: auto;
    border-bottom: none;
    padding: 10px 12px;
}

.stats-table .toggle-row:hover {
    background-color: #f8f9fa;
}

.stats-table .toggle-row a {
    color: #2c3e50;
    font-weight: bold;
    text-decoration: none;
}

.stats-table .toggle-row a:hover {
    text-decoration: underline;
}

.stats-table .feed-last-update {
    color: #777;
    font-size: 0.85em;
}

/* Log-specific styles */
.log-table {
    font-size: 14px;
}

.log-table th {
    position: sticky;
    top: 0;
    background-color: #2c3e50;
    color: white;
}

.log-table td:first-child {
    font-weight: bold;
    color: #e74c3c;
}

.log-table .time-column {
    white-space: nowrap;
    font-family:
        'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas,
        'Courier New', monospace;
}

.log-table .secs-column {
    text-align: right;
    font-family:
        'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas,
        'Courier New', monospace;
}

/* Headers display */
.headers {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-family:
        'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas,
        'Courier New', monospace;
    font-size: 12px;
}

.headers h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-family: inherit;
}

.headers ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.headers li {
    margin-bottom: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    table {
        font-size: 12px;
    }

    th,
    td {
        padding: 8px 4px;
    }

    .log-table .secs-column,
    .log-table .time-column {
        display: none;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.log-panel {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.feed-url {
    margin-top: 4px;
    margin-bottom: 0;
    font-size: 1em;
    color: #999;
}

.feed-url code {
    font-size: 1em;
    color: #888;
}

/* Prominent failure banner for a rejected action (e.g. the SSRF egress guard
   refusing a call), so a blocked request isn't mistaken for a success. */
.action-error {
    margin: 20px 0;
    padding: 12px 16px;
    border: 1px solid #f5c2c7;
    border-left: 4px solid #dc3545;
    border-radius: 5px;
    background: #f8d7da;
    color: #842029;
    font-weight: bold;
    white-space: pre-wrap;
    word-break: break-word;
}
