/**
 * Public Search Interface Styles
 * acapio.de Scam Database
 * Color scheme matching main acapio.de site
 */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #0a3d5c 0%, #0d4f73 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.site-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.site-header p {
    font-size: 16px;
    opacity: 0.9;
}

/* Search Section */
.search-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: -30px auto 30px;
    position: relative;
    z-index: 10;
    max-width: 900px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #00a8cc;
}

.search-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #00a8cc 0%, #0086a8 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #0086a8 0%, #00a8cc 100%);
}

.search-help {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Content Section */
.content-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.content-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #0a3d5c;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #00a8cc;
}

.stat-label {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Alert */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-info {
    background-color: #e7f6f8;
    border: 1px solid #00a8cc;
    color: #0a3d5c;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Table */
.scams-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.scams-table thead {
    background: #0a3d5c;
    color: white;
}

.scams-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #00a8cc;
}

.scams-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.scams-table tbody tr {
    transition: background-color 0.2s;
    cursor: pointer;
}

.scams-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Scam Row Link */
.scam-row-link {
    text-decoration: none;
    color: inherit;
    display: table-row;
}

.scam-type {
    font-weight: 600;
    color: #0a3d5c;
    margin-bottom: 5px;
}

.scam-preview {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.scam-contact {
    font-size: 14px;
}

.scam-contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: #00a8cc;
}

.scam-contact-item:last-child {
    margin-bottom: 0;
}

.scam-date {
    font-size: 13px;
    color: #999;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-new {
    background-color: #00a8cc;
    color: white;
}

/* Detail Page Styles */
.detail-header {
    background: linear-gradient(135deg, #0a3d5c 0%, #0d4f73 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.detail-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.detail-header .meta {
    font-size: 14px;
    opacity: 0.9;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.detail-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.detail-box h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #0a3d5c;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    line-height: 1.6;
}

.contact-list {
    list-style: none;
}

.contact-list li {
    padding: 10px;
    background: #f8f9fa;
    margin-bottom: 8px;
    border-radius: 4px;
    word-break: break-all;
}

.contact-list li strong {
    display: block;
    margin-bottom: 5px;
    color: #00a8cc;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.category-tag {
    background: #00a8cc;
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

/* Warning Box */
.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.warning-box h3 {
    color: #856404;
    margin-bottom: 10px;
}

.warning-box p {
    color: #856404;
    line-height: 1.6;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #00a8cc;
    transition: all 0.2s;
}

.pagination a:hover {
    background-color: #00a8cc;
    color: white;
    border-color: #00a8cc;
}

.pagination span.current {
    background-color: #00a8cc;
    color: white;
    border-color: #00a8cc;
    font-weight: 600;
}

.pagination-info {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #666;
}

.empty-state p {
    font-size: 16px;
}

/* Footer */
.site-footer {
    background: white;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 30px;
    color: #666;
}

.site-footer a {
    color: #00a8cc;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Back Button */
.back-button {
    display: inline-block;
    padding: 10px 20px;
    background: #00a8cc;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.back-button:hover {
    transform: translateY(-2px);
    background: #0086a8;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header {
        padding: 30px 20px;
    }
    
    .site-header h1 {
        font-size: 24px;
    }
    
    .search-section {
        padding: 20px;
        margin: -20px 20px 20px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .scams-table {
        font-size: 14px;
    }
    
    .scams-table th,
    .scams-table td {
        padding: 10px 8px;
    }
    
    /* Hide some columns on mobile */
    .scams-table .hide-mobile {
        display: none;
    }
}

/* Print Styles */
@media print {
    .search-section,
    .back-button,
    .site-footer,
    .pagination {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .detail-header {
        background: #0a3d5c;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Clickable row styling */
.scam-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.scam-row:hover {
    background-color: #f8f9fa;
}

/* Make links span full cell and remove default link styling */
.scam-link {
    display: block;
    color: inherit;
    text-decoration: none;
    width: 100%;
    height: 100%;
    padding: 12px 15px;
    margin: -12px -15px; /* Negative margin to expand to full cell */
}

.scam-link:hover {
    color: inherit;
    text-decoration: none;
}

/* Ensure nested elements stay visible */
.scam-link .scam-type,
.scam-link .scam-preview,
.scam-link .scam-contact-item,
.scam-link .scam-date {
    pointer-events: none; /* Prevent nested elements from blocking clicks */
}