/**
 * Betformatics Odds Tips Styles
 *
 * Dependencies: betformatics-variables (loaded via PHP)
 *
 * @package Betformatics
 * @subpackage Assets/CSS
 */

/* ========================================================================
   CONTAINER
   ======================================================================== */
.betformatics-odds-tips-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* ========================================================================
   ODDS TIP ITEM
   ======================================================================== */
.betformatics-odds-tip-item {
    position: relative;
    display: flex;
    align-items: stretch;
    background: var(--bf-bg-light);
    border: 1px solid var(--bf-border);
    border-radius: var(--bf-radius-base);
    padding: 16px;
    padding-right: 130px; /* Space for bookmaker button */
    transition: transform var(--bf-transition-base), box-shadow var(--bf-transition-base);
    min-height: 80px;
}

.betformatics-odds-tip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ========================================================================
   TYPE BADGE - HORIZONTAL (Top Right Corner)
   ======================================================================== */
.odds-tip-type-badge-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    pointer-events: none;
}

.odds-tip-type-badge {
    display: inline-block;
    min-width: 130px;
    padding: 5px 12px;
    background: var(--bf-primary);
    color: var(--bf-white);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    border-radius: 0 var(--bf-radius-base) 0 var(--bf-radius-base);
}

/* ========================================================================
   CONTENT
   ======================================================================== */
.odds-tip-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

/* ========================================================================
   HEADER
   ======================================================================== */
.odds-tip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.odds-tip-match {
    flex: 1;
}

.match-time {
    font-size: 12px;
    color: var(--bf-text-muted);
    font-weight: 500;
    margin-bottom: 2px;
}

.match-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--bf-gray-800);
    line-height: 1.3;
}

.odds-tip-bet {
    margin-top: 4px;
}

.bet-outcome {
    font-size: 15px;
    font-weight: 600;
    color: #2271b1;
}

/* ========================================================================
   DETAILS & STATS
   ======================================================================== */
.odds-tip-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.odds-tip-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stat-item {
    display: flex;
    gap: 4px;
    align-items: baseline;
}

.stat-label {
    font-size: 12px;
    color: var(--bf-text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--bf-gray-800);
}

.odds-value .stat-value {
    color: var(--bf-primary);
}

.units-value .stat-value {
    color: var(--bf-success-dark);
}

/* ========================================================================
   SPILMARKED TYPE BADGE (Bottom)
   ======================================================================== */
.odds-tip-type {
    margin-top: 2px;
}

.type-badge {
    display: inline-block;
    padding: 3px 8px;
    background: var(--bf-border);
    border-radius: var(--bf-radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: var(--bf-gray-600);
}

/* ========================================================================
   BOOKMAKER BUTTON - Right Side (Fixed Size)
   ======================================================================== */
.odds-tip-bookmaker-button {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 6px;
    z-index: 2;
    pointer-events: none;
    width: 120px;
    height: 40px;
    justify-content: center;
    box-sizing: border-box;
}

.bookmaker-button-logo {
    max-width: 70px;
    max-height: 22px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.bookmaker-button-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--bf-white);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.bookmaker-button-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bf-white);
    flex-shrink: 0;
}

.bookmaker-button-arrow svg {
    width: 16px;
    height: 16px;
}

/* ========================================================================
   LINK OVERLAY
   ======================================================================== */
.odds-tip-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    text-decoration: none;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================================================
   EMPTY STATE
   ======================================================================== */
.betformatics-odds-tips-empty {
    padding: 40px 20px;
    text-align: center;
    background-color: var(--bf-gray-50);
    border: 1px solid var(--bf-border);
    border-radius: var(--bf-radius-base);
    color: var(--bf-text-muted);
    font-size: 16px;
}

.betformatics-odds-tips-empty p {
    margin: 0 0 16px 0;
}

.betformatics-odds-tips-empty-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--bf-primary, #2563eb);
    color: var(--bf-white, #fff) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: var(--bf-radius-base, 8px);
    transition: background 0.2s ease;
}

.betformatics-odds-tips-empty-btn:hover {
    background: var(--bf-primary-hover, #1d4ed8);
    color: var(--bf-white, #fff) !important;
    text-decoration: none !important;
}

/* ========================================================================
   ERROR STATE
   ======================================================================== */
.betformatics-odds-tips-error {
    padding: 20px;
    background-color: var(--bf-warning-light);
    border: 1px solid var(--bf-star);
    border-radius: var(--bf-radius-base);
    color: var(--bf-warning-dark);
    font-size: 14px;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */
@media screen and (max-width: 768px) {
    .betformatics-odds-tip-item {
        padding: 14px;
        padding-right: 14px;
        padding-bottom: 60px; /* Space for button below */
        flex-direction: column;
    }

    .odds-tip-header {
        flex-direction: column;
    }

    .match-title {
        font-size: 15px;
    }

    .odds-tip-stats {
        gap: 10px;
    }

    /* Type badge */
    .odds-tip-type-badge {
        font-size: 9px;
        padding: 4px 10px;
        min-width: 110px;
    }

    /* Bookmaker button - keep fixed size on mobile */
    .odds-tip-bookmaker-button {
        right: 12px;
        bottom: 12px;
        width: 120px;
        height: 40px;
    }
}

@media screen and (max-width: 480px) {
    .betformatics-odds-tips-container {
        gap: 10px;
    }

    .betformatics-odds-tip-item {
        padding: 12px;
        padding-bottom: 55px;
    }

    /* Type badge */
    .odds-tip-type-badge {
        font-size: 8px;
        padding: 3px 8px;
        min-width: 100px;
    }

    .match-title {
        font-size: 14px;
    }

    .match-time {
        font-size: 11px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-value {
        font-size: 13px;
    }

    /* Bookmaker button - slightly smaller on small screens */
    .odds-tip-bookmaker-button {
        width: 110px;
        height: 38px;
        padding: 8px 12px;
    }

    .bookmaker-button-logo {
        max-width: 60px;
        max-height: 20px;
    }

    .bookmaker-button-arrow svg {
        width: 14px;
        height: 14px;
    }
}

/* ========================================================================
   ACCESSIBILITY
   ======================================================================== */
@media (prefers-reduced-motion: reduce) {
    .betformatics-odds-tip-item {
        transition: none;
    }

    .betformatics-odds-tip-item:hover {
        transform: none;
    }
}
