/**
 * MTG Rulings Drawer Styles
 * 
 * Styles for the slide-up rulings drawer with glassmorphism effects.
 *
 * @package MTG_Engine
 * @version 6.3.0
 */

/* Container */
.mtg-rulings-section {
    margin-top: 10px;
    text-align: center;
}

/* Trigger Button */
.mtg-rulings-trigger {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
}

.mtg-rulings-trigger:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* Drawer Container */
.mtg-rulings-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    /* Max height */
    max-height: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    /* High z-index to be on top of everything */
    transition: max-height 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Open State */
.mtg-rulings-drawer.open {
    max-height: 80vh;
    /* Expand to 80% viewport height */
}

/* Dark Mode Support (if applicable) */
@media (prefers-color-scheme: dark) {
    .mtg-rulings-drawer {
        background: rgba(30, 30, 30, 0.95);
        color: #e0e0e0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mtg-rulings-trigger {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #fff;
    }

    .mtg-rulings-trigger:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* Header */
.mtg-rulings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .mtg-rulings-header {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
}

.mtg-rulings-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

.mtg-rulings-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 8px;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.mtg-rulings-close:hover {
    opacity: 1;
}

/* Content Area */
.mtg-rulings-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.mtg-rulings-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mtg-rulings-content li {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (prefers-color-scheme: dark) {
    .mtg-rulings-content li {
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }
}

.mtg-rulings-content li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ruling-date {
    font-size: 0.75rem;
    opacity: 0.6;
    font-weight: 600;
}

.ruling-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Scrollbar styling */
.mtg-rulings-content::-webkit-scrollbar {
    width: 6px;
}

.mtg-rulings-content::-webkit-scrollbar-track {
    background: transparent;
}

.mtg-rulings-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

@media (prefers-color-scheme: dark) {
    .mtg-rulings-content::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
    }
}