/**
 * SportsPress Enhanced Features - Elementor Widgets Styles
 *
 * @package SportsPress_Enhanced_Features
 * @subpackage Assets
 * @version 2.2.4
 */

/* ==========================================================================
   Player Card Widget
   ========================================================================== */

.sp-elementor-player-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.sp-elementor-player-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sp-elementor-player-card-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: cover;
}

.sp-elementor-player-card-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.sp-elementor-player-card-content {
    flex: 1;
}

.sp-elementor-player-card .sp-elementor-title {
    font-size: 24px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.sp-elementor-player-card .sp-elementor-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: #666666;
    margin: 0 0 5px 0;
}

.sp-elementor-player-card .sp-elementor-text {
    font-size: 14px;
    color: #333333;
    margin: 5px 0;
    line-height: 1.5;
}

.sp-elementor-player-card .sp-player-number {
    display: inline-block;
    background: #2271b1;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    margin-bottom: 10px;
}

.sp-elementor-player-card .sp-player-meta {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* ==========================================================================
   Team Card Widget
   ========================================================================== */

.sp-elementor-team-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.sp-elementor-team-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sp-elementor-team-card-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.sp-elementor-team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sp-elementor-team-card .sp-elementor-title {
    font-size: 26px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 10px 0;
}

.sp-elementor-team-card .sp-elementor-subtitle {
    font-size: 14px;
    color: #666666;
    margin: 0 0 15px 0;
}

/* ==========================================================================
   Player List Widget
   ========================================================================== */

.sp-elementor-player-list {
    width: 100%;
}

.sp-elementor-player-list.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.sp-elementor-player-list.layout-list .sp-player-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.sp-elementor-player-list.layout-list .sp-player-item:last-child {
    border-bottom: none;
}

.sp-elementor-player-list .sp-player-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.3s ease;
}

.sp-elementor-player-list.layout-grid .sp-player-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.sp-elementor-player-list .sp-player-item-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.sp-elementor-player-list.layout-list .sp-player-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sp-elementor-player-list.layout-list .sp-player-item-image {
    margin-bottom: 0;
    flex-shrink: 0;
}

.sp-elementor-player-list .sp-player-item-name {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 5px 0;
}

.sp-elementor-player-list .sp-player-item-position {
    font-size: 14px;
    color: #666666;
    margin: 0;
}

/* ==========================================================================
   Player Stats Widget
   ========================================================================== */

.sp-elementor-player-stats {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.sp-elementor-player-stats .sp-stats-table {
    width: 100%;
    border-collapse: collapse;
}

.sp-elementor-player-stats .sp-stats-table th,
.sp-elementor-player-stats .sp-stats-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.sp-elementor-player-stats .sp-stats-table th {
    font-weight: 600;
    color: #333333;
    background: #f6f7f7;
}

.sp-elementor-player-stats .sp-stats-table tr:last-child td {
    border-bottom: none;
}

.sp-elementor-player-stats .sp-stat-value {
    font-weight: 700;
    color: #2271b1;
}

/* ==========================================================================
   Single Player Widget (Theme Builder)
   ========================================================================== */

.sp-single-player-container {
    width: 100%;
    margin: 0 auto;
}

/* Side by Side Layout (Image Left) */
.sp-single-player-layout-side-by-side {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    align-items: start;
}

/* Side by Side Reverse Layout (Image Right) */
.sp-single-player-layout-side-by-side-reverse {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* Stacked Layout (Image Top) */
.sp-single-player-layout-stacked {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.sp-single-player-layout-stacked .sp-single-player-image {
    width: 100%;
    max-width: 500px;
    margin-bottom: 30px;
}

.sp-single-player-layout-stacked .sp-single-player-info {
    width: 100%;
}

/* Custom Grid Layout */
.sp-single-player-layout-custom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

/* Player Image */
.sp-single-player-image {
    width: 100%;
}

.sp-single-player-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Player Info Container */
.sp-single-player-info {
    width: 100%;
}

/* Player Title */
.sp-single-player-title {
    font-size: 36px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

/* Player Info List */
.sp-player-info-list {
    width: 100%;
}

.sp-player-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.sp-player-info-row:last-child {
    border-bottom: none;
}

.sp-player-info-label {
    font-size: 14px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sp-player-info-value {
    font-size: 16px;
    font-weight: 400;
    color: #333333;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .sp-elementor-player-list.layout-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .sp-elementor-player-card,
    .sp-elementor-team-card {
        padding: 15px;
    }

    .sp-elementor-player-card .sp-elementor-title {
        font-size: 20px;
    }

    .sp-elementor-team-card .sp-elementor-title {
        font-size: 22px;
    }

    /* Single Player Responsive */
    .sp-single-player-layout-side-by-side,
    .sp-single-player-layout-side-by-side-reverse {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .sp-single-player-title {
        font-size: 28px;
    }

    .sp-player-info-label {
        font-size: 13px;
    }

    .sp-player-info-value {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .sp-elementor-player-list.layout-grid {
        grid-template-columns: 1fr;
    }

    .sp-elementor-player-card .sp-player-number {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 16px;
    }

    .sp-elementor-team-card-image {
        width: 100px;
        height: 100px;
    }

    /* Single Player Mobile */
    .sp-single-player-title {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .sp-player-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 12px 0;
    }

    .sp-player-info-label,
    .sp-player-info-value {
        font-size: 14px;
    }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.sp-elementor-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
}

.sp-elementor-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #999999;
    font-style: italic;
}

.sp-elementor-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* ==========================================================================
   Editor Specific Styles
   ========================================================================== */

.elementor-editor-active .sp-elementor-player-card,
.elementor-editor-active .sp-elementor-team-card,
.elementor-editor-active .sp-elementor-player-list {
    min-height: 100px;
}
