/* Go Tournament Registration - Frontend Styles */

.gtr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Messages */
.gtr-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.gtr-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.gtr-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.gtr-error ul {
    margin: 0;
    padding-left: 20px;
}

/* Registration Form */
.gtr-registration-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.gtr-registration-form h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
}

/* Anchor Links */
.gtr-anchor-link {
    text-decoration: none;
    opacity: 0.3;
    margin-left: 8px;
    font-size: 0.7em;
    vertical-align: middle;
    transition: opacity 0.2s;
}

.gtr-anchor-link:hover {
    opacity: 1;
}

.gtr-registration-form h2:hover .gtr-anchor-link,
.gtr-participant-list h2:hover .gtr-anchor-link {
    opacity: 0.7;
}

.gtr-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.gtr-form-field {
    display: flex;
    flex-direction: column;
}

.gtr-form-field label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.gtr-form-field .required {
    color: #dc3545;
}

.gtr-form-field input,
.gtr-form-field select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.gtr-form-field input:focus,
.gtr-form-field select:focus {
    outline: none;
    border-color: #4a90e2;
}

.gtr-form-field input.error,
.gtr-form-field select.error {
    border-color: #dc3545;
}

.gtr-form-field small {
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.gtr-form-submit {
    margin-top: 25px;
}

.gtr-button {
    background-color: #4a90e2;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.gtr-button:hover {
    background-color: #357abd;
}

/* Participant List */
.gtr-participant-list {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gtr-participant-list h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 24px;
}

.gtr-count {
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

.gtr-count strong {
    color: #4a90e2;
    font-size: 18px;
}

.gtr-no-participants {
    color: #666;
    font-style: italic;
}

.gtr-table {
    width: 100%;
    border-collapse: collapse;
}

.gtr-table thead {
    background-color: #f8f9fa;
}

.gtr-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.gtr-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.gtr-table tbody tr:hover {
    background-color: #f8f9fa;
}

.gtr-strength {
    font-weight: 600;
    color: #4a90e2;
}

/* EGD Lookup Row */
.gtr-egd-lookup-row {
    text-align: center;
    margin-bottom: 20px;
}

/* EGD Lookup Button */
.gtr-egd-lookup-btn {
    background-color: #6c757d;
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
}

.gtr-egd-lookup-btn:hover {
    background-color: #5a6268;
}

.gtr-egd-lookup-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.gtr-egd-lookup-btn.gtr-loading {
    position: relative;
    color: transparent;
}

.gtr-egd-lookup-btn.gtr-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: gtr-spin 0.8s linear infinite;
}

@keyframes gtr-spin {
    to { transform: rotate(360deg); }
}

/* EGD Dropdown */
.gtr-egd-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 350px;
    overflow-y: auto;
    margin-top: 5px;
}

.gtr-egd-dropdown-error {
    border-color: #dc3545;
}

.gtr-egd-player {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.gtr-egd-player:hover {
    background-color: #f8f9fa;
}

.gtr-egd-player:last-of-type {
    border-bottom: none;
}

.gtr-egd-player-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.gtr-egd-player-details {
    font-size: 13px;
    color: #666;
}

.gtr-egd-player-details span {
    margin-right: 12px;
}

.gtr-egd-player-strength {
    font-weight: 600;
    color: #4a90e2;
}

.gtr-egd-player-country {
    color: #888;
}

.gtr-egd-player-club {
    color: #888;
    font-style: italic;
}

.gtr-egd-no-results {
    padding: 15px;
    color: #666;
    text-align: center;
    font-style: italic;
}

.gtr-egd-error {
    padding: 15px;
    color: #721c24;
    text-align: center;
}

.gtr-egd-overflow {
    padding: 12px 15px;
    background-color: #fff3cd;
    color: #856404;
    font-size: 13px;
    border-top: 1px solid #ffc107;
}

.gtr-egd-overflow a {
    color: #0056b3;
    text-decoration: underline;
}

.gtr-egd-not-registered {
    padding: 12px 15px;
    cursor: pointer;
    color: #666;
    font-style: italic;
    text-align: center;
    border-top: 1px solid #eee;
    transition: background-color 0.2s;
}

.gtr-egd-not-registered:hover {
    background-color: #f8f9fa;
}

.gtr-egd-filled {
    animation: gtr-highlight 1.5s ease-out;
}

@keyframes gtr-highlight {
    0% { background-color: #d4edda; border-color: #28a745; }
    100% { background-color: #fff; border-color: #ddd; }
}

/* Rounds Selection */
.gtr-rounds-row {
    grid-template-columns: 1fr;
}

.gtr-rounds-field {
    grid-column: 1 / -1;
}

.gtr-rounds-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.gtr-rounds-checkboxes.error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.gtr-round-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.2s;
}

.gtr-round-checkbox:hover {
    border-color: #4a90e2;
    background: #f0f7ff;
}

.gtr-round-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.gtr-round-checkbox input[type="checkbox"]:checked + span,
.gtr-round-checkbox:has(input:checked) {
    color: #4a90e2;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gtr-form-row {
        grid-template-columns: 1fr;
    }

    .gtr-container {
        padding: 10px;
    }

    .gtr-registration-form,
    .gtr-participant-list {
        padding: 20px;
    }

    .gtr-table {
        font-size: 14px;
    }

    .gtr-table th,
    .gtr-table td {
        padding: 8px;
    }
}
