/**
 * VCR Championship Registration Styles
 * 
 * @package VCR_Module
 * @since 1.0.0
 */

/* Modal Overlay */
.vcr-championship-reg-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.vcr-championship-reg-modal.active {
    display: flex;
}

/* Modal Content */
.vcr-championship-reg-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

/* Header */
.vcr-championship-reg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1a202c, #2d3748);
    color: #fff;
}

.vcr-championship-reg-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff !important;
}

.vcr-championship-reg-close {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    color: #fff !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.vcr-championship-reg-close:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Body */
.vcr-championship-reg-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Loading */
.vcr-championship-reg-loading {
    text-align: center;
    padding: 40px;
    color: #718096;
}

.vcr-championship-reg-loading .vcr-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #e53e3e;
    border-radius: 50%;
    animation: vcr-spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* Fee Info */
.vcr-championship-reg-fees {
    display: flex;
    gap: 20px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 20px;
}

.vcr-fee-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vcr-fee-label {
    font-size: 12px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vcr-fee-value {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.vcr-gm-amount {
    color: #3182ce;
}

/* Sections */
.vcr-championship-reg-section {
    margin-bottom: 24px;
}

.vcr-championship-reg-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

/* List */
.vcr-championship-reg-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Item */
.vcr-championship-reg-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s;
}

.vcr-championship-reg-item:hover {
    border-color: #cbd5e0;
}

.vcr-reg-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vcr-reg-item-avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
}

.vcr-reg-item-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    font-size: 20px;
}

.vcr-reg-item-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vcr-reg-item-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.vcr-reg-item-role {
    font-size: 11px;
    color: #718096;
    text-transform: capitalize;
}

.vcr-reg-item-balance {
    font-size: 12px;
    color: #4a5568;
}

/* Action */
.vcr-reg-item-action {
    display: flex;
    align-items: center;
}

.vcr-btn-register-team,
.vcr-btn-register-federation {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.vcr-btn-register-team:hover,
.vcr-btn-register-federation:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-1px);
}

/* Status */
.vcr-reg-status {
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
}

.vcr-reg-status-registered {
    background: #c6f6d5;
    color: #276749;
}

.vcr-reg-status-insufficient {
    background: #fed7d7;
    color: #c53030;
}

/* Empty State */
.vcr-championship-reg-empty {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.vcr-championship-reg-empty p {
    margin: 0 0 8px 0;
}

/* Error */
.vcr-championship-reg-error {
    text-align: center;
    padding: 40px 20px;
    color: #c53030;
    background: #fed7d7;
    border-radius: 8px;
}

/* Success */
.vcr-championship-reg-success {
    text-align: center;
    padding: 40px 20px;
    color: #276749;
    background: #c6f6d5;
    border-radius: 8px;
}

.vcr-championship-reg-success .vcr-success-icon {
    font-size: 48px;
    color: #38a169;
    margin-bottom: 16px;
}

.vcr-championship-reg-success h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #276749;
}

.vcr-championship-reg-success p {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #2f855a;
}

.vcr-btn-close-success {
    background: linear-gradient(135deg, #48bb78, #38a169) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.vcr-btn-close-success:hover {
    background: linear-gradient(135deg, #38a169, #2f855a) !important;
}

.vcr-btn-close-success:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Team info container in table */
.vcr-team-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vcr-team-registered-by {
    font-size: 10px;
    color: #ed8936;
    font-style: italic;
}

/* Team registered badge on CARD */
.vcr-team-registered-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 4px 8px;
    background: rgba(237, 137, 54, 0.85);
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.vcr-team-registered-badge svg {
    color: #fff;
}

/* Group (federation) registered badge on CARD - violet */
.vcr-group-registered-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 4px 8px;
    background: rgba(139, 92, 246, 0.85);
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.vcr-group-registered-badge svg {
    color: #fff;
}

/* Info notice in modal */
.vcr-reg-info-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: rgba(72, 187, 120, 0.15);
    border: 1px solid rgba(72, 187, 120, 0.3);
    border-radius: 8px;
    color: #276749;
    font-size: 13px;
    font-weight: 500;
}

.vcr-reg-info-notice svg {
    color: #38a169;
    flex-shrink: 0;
}

/* Team registered row in federation list */
.vcr-team-registered-row {
    background: rgba(237, 137, 54, 0.1) !important;
}

.vcr-team-registered-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    background: rgba(237, 137, 54, 0.85);
    color: #fff;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Button style under championship title */
.vcr-btn-team-register {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin: 8px 0 4px 0;
}

.vcr-btn-team-register:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-1px);
}

.vcr-btn-team-register svg {
    flex-shrink: 0;
}

/* ========================================
   NEW VIEWS: Choice, Teams Table, Federations
   ======================================== */

/* Read-only notice */
.vcr-reg-readonly-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #92400e;
}

.vcr-reg-readonly-notice p {
    margin: 0 0 4px 0;
}

.vcr-reg-readonly-notice p:last-child {
    margin-bottom: 0;
}

/* Choice Container */
.vcr-reg-choice-container {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 20px 0;
}

.vcr-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 32px;
    background: #f7fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 180px;
}

.vcr-choice-btn:hover:not([disabled]) {
    border-color: #3182ce !important;
    background: #ebf8ff !important;
    transform: translateY(-2px);
}

.vcr-choice-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.vcr-choice-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.vcr-choice-icon {
    font-size: 32px;
}

.vcr-choice-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.vcr-choice-fee {
    font-size: 16px;
    font-weight: 700;
}

.vcr-choice-count {
    font-size: 11px;
    color: #718096;
}

/* Back Button */
.vcr-reg-back-btn {
    background: transparent !important;
    border: none !important;
    color: #3182ce !important;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px !important;
    margin-bottom: 12px;
}

.vcr-reg-back-btn:hover {
    text-decoration: underline;
    background: #ebf8ff !important;
    border-radius: 4px;
}

.vcr-reg-back-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Fee Banner */
.vcr-reg-fee-banner {
    background: linear-gradient(135deg, #ebf8ff, #e6fffa);
    border: 1px solid #90cdf4;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #2c5282;
}

.vcr-reg-fee-banner span {
    font-weight: 500;
}

/* Teams Table */
.vcr-reg-teams-table {
    overflow-x: auto;
}

.vcr-reg-teams-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.vcr-reg-teams-table th {
    text-align: left;
    padding: 10px 8px;
    background: #f7fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #4a5568;
    font-size: 11px;
    text-transform: uppercase;
}

.vcr-reg-teams-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.vcr-reg-teams-table tr:hover {
    background: #f7fafc;
}

.vcr-reg-teams-table tr.vcr-row-registered {
    background: #f0fff4;
}

/* Team Cell */
.vcr-team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vcr-team-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.vcr-team-name {
    font-weight: 500;
    color: #2d3748;
}

/* Badges - use inline styles from JS to match card badges */

/* Wallet Cell */
.vcr-wallet-cell {
    cursor: help;
}

.vcr-wallet-compact {
    font-weight: 500;
    color: #3182ce;
}

/* Action Cell */
.vcr-action-cell {
    text-align: right;
}

.vcr-btn-register,
.vcr-btn-cancel {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.vcr-btn-register {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: #fff;
}

.vcr-btn-register:hover:not([disabled]) {
    background: linear-gradient(135deg, #38a169, #2f855a);
}

.vcr-btn-cancel {
    background: linear-gradient(135deg, #fc8181, #e53e3e);
    color: #fff;
}

.vcr-btn-cancel:hover:not([disabled]) {
    background: linear-gradient(135deg, #e53e3e, #c53030);
}

.vcr-btn-register[disabled],
.vcr-btn-cancel[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Federations List */
.vcr-reg-federations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vcr-championship-reg-fed-item {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.vcr-championship-reg-fed-item.registered {
    background: #f0fff4;
    border-color: #9ae6b4;
}

.vcr-championship-reg-fed-item.blocked {
    background: #fffaf0;
    border-color: #fbd38d;
}

/* Federation Header */
.vcr-fed-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
}

.vcr-fed-expand-btn {
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    font-size: 12px;
    color: #718096 !important;
    padding: 4px;
    transition: transform 0.2s;
}

.vcr-fed-expand-btn:hover {
    background: rgba(0,0,0,0.05) !important;
    border-radius: 4px;
}

.vcr-fed-expand-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.vcr-championship-reg-fed-item.expanded .vcr-fed-expand-btn {
    transform: rotate(90deg);
}

.vcr-fed-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.vcr-fed-name {
    flex: 1;
    font-weight: 600;
    color: #2d3748;
}

.vcr-fed-wallet {
    font-weight: 500;
    color: #3182ce;
    cursor: help;
}

.vcr-fed-action {
    margin-left: auto;
}

.vcr-fed-blocked {
    font-size: 11px;
    color: #c05621;
    background: #feebc8;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Federation Teams (expandable) */
.vcr-fed-teams {
    display: none;
    border-top: 1px solid #e2e8f0;
    padding: 12px;
    background: #fff;
}

.vcr-championship-reg-fed-item.expanded .vcr-fed-teams {
    display: block;
}

.vcr-fed-teams table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.vcr-fed-teams th {
    text-align: left;
    padding: 6px;
    font-weight: 600;
    color: #718096;
    font-size: 10px;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
}

.vcr-fed-teams td {
    padding: 8px 6px;
    border-bottom: 1px solid #f0f0f0;
}

.vcr-fed-teams .vcr-team-logo {
    width: 24px;
    height: 24px;
}

/* Mobile */
@media (max-width: 768px) {
    .vcr-championship-reg-modal {
        padding: 10px;
    }
    
    .vcr-championship-reg-content {
        max-height: 95vh;
    }
    
    .vcr-championship-reg-header {
        padding: 14px 16px;
    }
    
    .vcr-championship-reg-header h3 {
        font-size: 14px;
    }
    
    .vcr-championship-reg-body {
        padding: 16px;
    }
    
    .vcr-championship-reg-fees {
        flex-direction: column;
        gap: 12px;
    }
    
    .vcr-championship-reg-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .vcr-reg-item-action {
        justify-content: flex-end;
    }
}

/* Federation confirmation and success tables */
.vcr-fed-confirmation,
.vcr-fed-success {
    padding: 20px;
    text-align: center;
}

.vcr-fed-confirmation h4 {
    color: #ed8936;
    margin-bottom: 12px;
}

.vcr-fed-success h4 {
    color: #38a169;
    margin-bottom: 8px;
}

.vcr-fed-warning {
    color: #c53030;
    font-size: 13px;
    margin-bottom: 16px;
    background: rgba(197, 48, 48, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
}

.vcr-fed-confirmation h5 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #4a5568;
}

.vcr-fed-payment-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 13px;
}

.vcr-fed-payment-table th {
    background: #edf2f7;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #cbd5e0;
}

.vcr-fed-payment-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.vcr-fed-payment-table tr.vcr-full-wallet {
    background: rgba(237, 137, 54, 0.1);
}

.vcr-amount-cell {
    text-align: right;
    font-weight: 500;
    white-space: nowrap;
}

.vcr-full-wallet-tag {
    font-size: 10px;
    color: #ed8936;
    font-weight: 600;
}

.vcr-fed-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.vcr-btn-cancel-confirm {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.vcr-btn-cancel-confirm:hover {
    background: #cbd5e0;
}

.vcr-btn-proceed-confirm {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.vcr-btn-proceed-confirm:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
}
