/* So Mo - Giai Mong Chiem Bao - Frontend Styles */

#so-mo-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Search Box */
.somo-search-box {
    margin-bottom: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.somo-search-label {
    display: block;
    color: #fff;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 10px;
    opacity: 0.9;
}

.somo-search-inner {
    display: flex;
    gap: 10px;
    align-items: center;
}

#somo-keyword {
    flex: 1;
    height: 46px;
    padding: 0 18px;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) inset;
    transition: box-shadow 0.2s;
    box-sizing: border-box;
}

#somo-keyword:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

#somo-keyword::placeholder {
    color: #999;
    font-style: italic;
}

#somo-search-btn {
    height: 46px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 600;
    color: #e74c3c;
    background: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

#somo-search-btn:hover {
    background: #fff8e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#somo-search-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Title */
.somo-title {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    font-weight: 700;
    color: #e74c3c;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e74c3c;
}

/* Table */
.somo-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
}

.somo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.somo-table thead th {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    padding: 12px 14px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.somo-table thead th:first-child {
    border-radius: 8px 0 0 0;
}

.somo-table thead th:last-child {
    border-radius: 0 8px 0 0;
}

.somo-col-stt {
    width: 60px;
}

.somo-col-name {
    min-width: 200px;
    text-align: left !important;
}

.somo-col-numbers {
    min-width: 150px;
}

.somo-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.somo-table tbody tr:hover {
    background: #fafafa;
}

.somo-table tbody td {
    padding: 10px 14px;
    text-align: center;
    vertical-align: middle;
}

.somo-table tbody td:nth-child(2) {
    text-align: left;
    color: #2c3e50;
    font-weight: 500;
}

.somo-table tbody td:last-child strong {
    color: #e74c3c;
    font-size: 1em;
    font-weight: 700;
}

.somo-table tbody td:first-child {
    color: #666;
    font-weight: 500;
}

.somo-no-result {
    text-align: center !important;
    padding: 40px 15px !important;
    color: #999;
    font-style: italic;
}

/* Pagination */
.somo-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 16px 0 0;
    border-top: 1px solid #f0f0f0;
}

.somo-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    text-decoration: none;
    color: #555;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.88em;
    transition: all 0.2s;
}

.somo-pagination a:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.somo-pagination a.active {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
    pointer-events: none;
    font-weight: 700;
}

.somo-pagination .somo-page-prev,
.somo-pagination .somo-page-next {
    font-size: 0.85em;
    padding: 0 12px;
}

.somo-pagination .somo-page-prev.disabled,
.somo-pagination .somo-page-next.disabled {
    color: #bbb;
    background: #f5f5f5;
    border-color: #e8e8e8;
    pointer-events: none;
    cursor: default;
}

.somo-pagination .somo-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 36px;
    color: #999;
    font-size: 0.9em;
    pointer-events: none;
}

/* Loading */
.somo-loading {
    text-align: center;
    padding: 20px;
}

.somo-loading span {
    display: inline-block;
    padding: 10px 20px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 20px;
    color: #f57f17;
    font-size: 0.9em;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    #so-mo-wrapper {
        padding: 12px;
    }

    .somo-search-box {
        padding: 16px;
    }

    .somo-search-inner {
        flex-direction: column;
    }

    #somo-search-btn {
        width: 100%;
    }

    .somo-title {
        font-size: 1em;
    }

    .somo-table {
        font-size: 0.85em;
    }

    .somo-table thead th {
        padding: 8px 6px;
        font-size: 0.8em;
    }

    .somo-table tbody td {
        padding: 8px 6px;
    }

    .somo-pagination a {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 0.82em;
    }

    .somo-pagination .somo-page-prev,
    .somo-pagination .somo-page-next {
        padding: 0 8px;
    }
}

@media (max-width: 480px) {
    .somo-table thead th,
    .somo-table tbody td {
        padding: 6px 4px;
    }

    .somo-search-box {
        padding: 12px;
    }

    #somo-keyword {
        height: 42px;
        padding: 0 14px;
        font-size: 14px;
    }

    #somo-search-btn {
        height: 42px;
        padding: 0 20px;
        font-size: 14px;
    }
}
