/**
 * VZones Game Results — Frontend Styles
 */

.vz-gr-box {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Form fields */
.vz-gr-field {
    margin-bottom: 14px;
}

.vz-gr-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.vz-gr-field label .required {
    color: #c0392b;
}

.vz-gr-field input,
.vz-gr-field select {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    color: #333 !important;
    height: 40px !important;
    line-height: 1.4 !important;
}

/* Primary button */
.vz-gr-btn {
    display: inline-block;
    padding: 10px 24px !important;
    background: #2980b9 !important;
    color: #fff !important;
    border: 1px solid #2980b9 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    height: 40px !important;
}

.vz-gr-btn:hover {
    background: #1a6da0 !important;
}

/* Alert messages */
.vz-gr-msg {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
}

.vz-gr-msg--error {
    background: #fdecea !important;
    color: #c0392b !important;
    border: 1px solid #f5c6cb !important;
}

.vz-gr-msg--ok {
    background: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
}

/* Data tables */
.vz-gr-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.vz-gr-table th {
    background: #f5f5f5;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #ddd;
}

.vz-gr-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    vertical-align: middle;
}

.vz-gr-table tbody tr:hover {
    background: #f9f9f9;
}

/* Leaderboard podium */
.vz-gr-top3 td {
    font-weight: 600;
}

.vz-gr-rank-1 td { background: rgba(255, 215, 0, .1); }
.vz-gr-rank-2 td { background: rgba(192, 192, 192, .1); }
.vz-gr-rank-3 td { background: rgba(205, 127, 50, .1); }

/* Month navigation */
.vz-gr-month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.vz-gr-month-nav a {
    color: #2980b9;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.vz-gr-month-nav a:hover {
    color: #1a6da0;
}

/* Filter bar */
.vz-gr-filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

/* Pagination */
.vz-gr-pagination {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.vz-gr-page {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
}

/* ── Mobile (server-detected via wp_is_mobile) ── */
.vz-gr-mobile {
    padding: 12px !important;
    margin: 0 !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.vz-gr-mobile .vz-gr-filter-row {
    flex-direction: column;
    gap: 8px;
}

.vz-gr-mobile .vz-gr-filter-row .vz-gr-field {
    width: 100%;
}

.vz-gr-mobile .vz-gr-filter-row .vz-gr-btn {
    width: 100% !important;
}

.vz-gr-mobile .vz-gr-filter-row > div[style*="margin-top"] {
    margin-top: 0 !important;
}

/* Table: card layout on mobile */
.vz-gr-mobile .vz-gr-table,
.vz-gr-mobile .vz-gr-table thead,
.vz-gr-mobile .vz-gr-table tbody,
.vz-gr-mobile .vz-gr-table tr,
.vz-gr-mobile .vz-gr-table th,
.vz-gr-mobile .vz-gr-table td {
    display: block;
    width: 100%;
}

.vz-gr-mobile .vz-gr-table thead {
    display: none;
}

.vz-gr-mobile .vz-gr-table {
    margin-top: 8px !important;
}

.vz-gr-mobile .vz-gr-table tr {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fafafa;
    overflow: hidden;
    word-wrap: break-word;
}

.vz-gr-mobile .vz-gr-table th {
    font-size: 10px !important;
    padding: 6px 4px !important;
}

.vz-gr-mobile .vz-gr-table td {
    padding: 6px 4px !important;
    font-size: 11px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: break-word !important;
}

.vz-gr-mobile .vz-gr-table td img {
    width: 20px !important;
    height: 20px !important;
}

.vz-gr-mobile .vz-gr-table td:before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    display: block;
    margin-bottom: 2px;
}

.vz-gr-mobile .vz-gr-month-nav {
    font-size: 13px;
}

.vz-gr-mobile .vz-gr-month-nav h3 {
    font-size: 16px !important;
}

.vz-gr-page--current {
    background: #2980b9;
    color: #fff;
    border-color: #2980b9;
}

.vz-gr-page:hover {
    background: #f0f0f0;
}
