/**
 * Frontend Styles
 */

.sp-player-forms-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
}

.sp-forms-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: #333;
}

.sp-forms-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.sp-no-lists {
    padding: 20px;
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    font-size: 16px;
}

/* Forms Notice */
.sp-forms-notice {
    margin-bottom: 20px;
}

.sp-forms-notice .notice {
    padding: 15px 20px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 15px;
}

.sp-forms-notice .notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.sp-forms-notice .notice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Team Selector */
.sp-team-selector {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
}

.sp-team-selector label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.sp-team-dropdown {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sp-team-dropdown:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Table Container */
#sp-team-forms-container {
    margin-top: 30px;
}

.sp-list-section {
    margin-bottom: 40px;
}

.sp-list-title {
    font-size: 24px;
    font-weight: 700;
    color: #2271b1;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #2271b1;
}

/* Table Form */
.sp-table-form {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.sp-player-table {
    width: 100%;
    border-collapse: collapse;
}

.sp-player-table thead {
    background: #2271b1;
    color: #fff;
}

.sp-player-table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
}

.sp-player-table tbody tr {
    border-bottom: 1px solid #e9ecef;
}

.sp-player-table tbody tr:last-child {
    border-bottom: none;
}

.sp-player-table tbody tr:hover {
    background: #f8f9fa;
}

.sp-player-table tbody td {
    padding: 12px 15px;
}

.sp-player-name-cell {
    font-weight: 600;
    color: #333;
    min-width: 150px;
}

.sp-player-table input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.sp-player-table input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.sp-player-table .required {
    color: #d63638;
    margin-left: 3px;
}

/* Form Actions */
.sp-form-actions {
    text-align: center;
    padding: 25px;
    background: #f8f9fa;
}

.sp-submit-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sp-submit-btn:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sp-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.sp-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

.sp-spinner.active {
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sp-player-forms-container {
        padding: 15px;
    }

    .sp-team-dropdown {
        max-width: 100%;
    }

    .sp-player-table {
        font-size: 14px;
    }

    .sp-player-table thead th,
    .sp-player-table tbody td {
        padding: 10px;
    }

    .sp-player-table input {
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 600px) {

    /* Stack table on mobile */
    .sp-player-table thead {
        display: none;
    }

    .sp-player-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        padding: 15px;
    }

    .sp-player-table tbody td {
        display: block;
        padding: 8px 0;
        border: none;
    }

    .sp-player-name-cell {
        font-size: 18px;
        color: #2271b1;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 2px solid #e9ecef;
    }

    .sp-player-table tbody td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        margin-bottom: 5px;
        color: #666;
    }
}