/* Trade Analyzer Specific Styles */

.trade-analyzer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

@media (min-width: 768px) {
    .trade-analyzer-container {
        margin-top: 50px;
    }
}

@media (min-width: 1400px) {
    .trade-analyzer-container {
        max-width: 1400px;
        padding: 40px;
        margin-top: 50px;
    }
}

.trade-form {
    background: var(--bg-secondary);
    border: 2px solid var(--text-accent);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
}

.form-section {
    margin-bottom: 25px;
}

.form-section label {
    display: block;
    color: var(--text-accent);
    margin-bottom: 8px;
    font-weight: bold;
}

.player-input-group {
    position: relative;
    margin-bottom: 10px;
}

.player-input {
    width: 100%;
    padding: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--text-accent);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--text-accent);
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
}

.autocomplete-item {
    padding: 15px 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.autocomplete-item:hover,
.autocomplete-item:active {
    background: rgba(0, 255, 0, 0.1);
}

.player-tag {
    display: inline-block;
    background: var(--text-accent);
    color: var(--bg-primary);
    padding: 5px 10px;
    margin: 5px;
    border-radius: 4px;
    font-size: 14px;
}

.player-tag .remove {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
}

.scoring-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-primary);
}

.slider-container {
    margin-bottom: 20px;
}

.slider {
    width: 100%;
    height: 40px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #00ff00 0%, #ff0000 50%, #0080ff 100%);
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    border-radius: 20px;
}

.slider:hover {
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: var(--text-primary);
    cursor: pointer;
    border-radius: 50%;
}

.slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: var(--text-primary);
    cursor: pointer;
    border-radius: 50%;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.image-upload {
    border: 2px dashed var(--text-accent);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s;
}

.image-upload:hover {
    background: rgba(0, 255, 0, 0.05);
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    margin: 10px;
    border: 1px solid var(--text-accent);
}

.submit-trade-btn {
    background: var(--text-accent);
    color: var(--bg-primary);
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.submit-trade-btn:hover {
    opacity: 0.9;
}

.trades-list {
    margin-top: 40px;
}

.trade-card {
    background: var(--bg-secondary);
    border: 1px solid var(--text-accent);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.trade-players {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.trade-arrow {
    display: flex;
    align-items: center;
    color: var(--text-accent);
    font-size: 24px;
}

.trade-details {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

.vote-section {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.vote-btn {
    background: transparent;
    border: 2px solid var(--text-accent);
    color: var(--text-accent);
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: all 0.2s;
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.vote-btn:hover {
    background: rgba(0, 255, 0, 0.1);
}

.vote-btn.strong-yes {
    border-color: #00ff00;
    color: #00ff00;
}

.vote-btn.slight-yes {
    border-color: #88ff88;
    color: #88ff88;
}

.vote-btn.slight-no {
    border-color: #ff8888;
    color: #ff8888;
}

.vote-btn.strong-no {
    border-color: #ff0000;
    color: #ff0000;
}

.vote-btn.active {
    background: rgba(0, 255, 0, 0.2);
    font-weight: bold;
}

/* Admin vote styling */
.vote-btn.admin-voted {
    background: rgba(135, 206, 250, 0.3);
    position: relative;
}

.vote-btn.admin-voted::after {
    content: "Admin's Vote";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e90ff;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 5px;
    z-index: 1000;
}

.vote-btn.admin-voted::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e90ff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: -5px;
}

.vote-btn.admin-voted:hover::after,
.vote-btn.admin-voted:hover::before {
    opacity: 1;
}

.vote-btn.user-voted.admin-voted {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.3) 0%, rgba(135, 206, 250, 0.3) 100%);
}

.vote-count {
    font-size: 12px;
}

@media (max-width: 768px) {
    .vote-section {
        flex-direction: column;
    }

    .vote-btn {
        width: 100%;
        min-width: 100%;
    }
}

.admin-response {
    background: rgba(0, 255, 0, 0.1);
    border-left: 3px solid var(--text-accent);
    padding: 15px;
    margin-top: 15px;
}

.admin-response-form {
    margin-top: 15px;
}

.admin-response-input {
    width: 100%;
    padding: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--text-accent);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    min-height: 100px;
}

.filter-section {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--text-accent);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.filter-btn.active {
    background: var(--text-accent);
    color: var(--bg-primary);
}

/* Responsive layouts */
.players-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .players-row {
        flex-direction: row;
    }

    .players-row > div {
        flex: 1;
    }
}

.league-info-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .league-info-row {
        flex-direction: row;
    }

    .league-info-row > div {
        flex: 1;
    }
}

.scoring-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.image-upload-container {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Requirements Checklist */
.requirements-panel {
    background: var(--bg-secondary);
    border: 2px solid var(--text-accent);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.requirements-title {
    color: var(--text-accent);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-primary);
}

.requirement-icon {
    font-size: 20px;
    font-weight: bold;
    min-width: 25px;
}

.requirement-icon.complete {
    color: #00ff00;
}

.requirement-icon.incomplete {
    color: #ff0000;
}

.requirement-text {
    flex: 1;
}

.requirement-subitem {
    margin-left: 35px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Image Modal */
.image-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.image-modal-overlay.active {
    display: flex;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.image-modal-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.image-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: white;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    user-select: none;
}

.image-modal-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.image-modal-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.image-modal-prev {
    left: 20px;
}

.image-modal-next {
    right: 20px;
}

.image-modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
}
