/* Boat layout styles */
.boat-container {
    position: relative;
    margin-top: 20px;
}

/* Boat section header */
.boat-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.boat-section-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 700;
}

.btn-clear-lineup {
    background-color: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.btn-clear-lineup:hover {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Instructions panel */
.instructions-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.instruction-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-color);
}

.instruction-item:last-child {
    margin-bottom: 0;
}

.instruction-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

/* Statistics panel */
.boat-statistics-panel {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.stats-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 60px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.stat-item.highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
}

.stat-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1;
}

.stat-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--secondary-color);
    line-height: 1.1;
}

.stat-separator {
    width: 1px;
    height: 40px;
    background-color: var(--border-color);
    margin: 0 5px;
}

/* Gender-specific colors for M/F widget */
.gender-count.male-color {
    color: #1976d2;
}

.gender-count.female-color {
    color: #d63384;
}

/* Statistics visual indicators */
.stat-value.balanced {
    color: var(--success-color);
}

.stat-value.unbalanced {
    color: var(--danger-color);
}

/* Gender statistics in combined widget */
.gender-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.gender-count {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.gender-separator {
    font-size: 16px;
    font-weight: 400;
    color: var(--secondary-color);
}

/* Boat layout wrapper */
.boat-layout-wrapper {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.boat {
    background: transparent;
    border: 3px solid #4a90e2;
    border-radius: 20px;
    padding: 20px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.boat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    position: relative;
}

.boat-row::before {
    content: "";
    position: absolute;
    left: 25%;
    right: 25%;
    height: 2px;
    background-color: #888;
    top: 50%;
    transform: translateY(-50%);
    z-index: 0;
}

.row-number {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border: 1px solid #888;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    z-index: 1;
}

.seat {
    flex: 1;
    height: 60px;
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: white;
    z-index: 2;
    margin: 0 8px;
    max-width: 45%;
}

.seat.left {
    background-color: #f0f8ff;
}

.seat.right {
    background-color: #fff0f0;
}

.seat.fixed {
    border: 2px solid var(--success-color);
}

.seat-paddler {
    width: 100%;
    height: 100%;
    padding: 8px;
    cursor: move;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Gender-based styling for paddlers - only text color */
.seat-paddler.male .paddler-name {
    color: #1976d2; /* Blue text for males */
}

.seat-paddler.female .paddler-name {
    color: #d63384; /* Muted pink text for females */
}

.seat-label {
    position: absolute;
    top: -8px;
    left: 8px;
    font-size: 12px;
    background-color: inherit;
    padding: 0 4px;
    color: var(--secondary-color);
}

/* Drag and drop styles */
.dragging {
    opacity: 0.5;
}

.can-drop {
    background-color: #e8f8e8;
    border: 2px dashed var(--success-color);
}

.cannot-drop {
    background-color: #ffe8e8;
    border: 2px dashed var(--danger-color);
}

/* Styles for the boat seat dropdown */
.seat-dropdown-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.2s;
    z-index: 3;
}

.seat:hover .seat-dropdown-button {
    opacity: 1;
}

.dropdown-icon {
    font-size: 12px;
    font-style: normal;
    color: var(--secondary-color);
}

.boat-paddler-dropdown {
    position: absolute;
    z-index: 1000;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    max-height: 350px;
    width: 260px;
    overflow-y: auto;
    padding: 8px 0;
    animation: fadeIn 0.2s ease-out;
}

.boat-paddler-search {
    margin: 0 10px 8px;
    padding: 8px;
    width: calc(100% - 20px);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.boat-paddler-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.15);
}

.boat-paddler-list {
    max-height: 280px;
    overflow-y: auto;
}

.boat-paddler-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.boat-paddler-item:last-child {
    border-bottom: none;
}

.boat-paddler-item:hover {
    background-color: #f8f9fa;
}

.boat-paddler-item.selected {
    background-color: #e2f2ff;
}

.boat-paddler-item.in-boat:not(.selected) {
    color: #6c757d;
    font-style: italic;
}

.empty-option {
    color: #6c757d;
    justify-content: center;
    border-bottom: 1px solid #dee2e6;
    font-style: italic;
    padding: 10px;
}

.boat-paddler-name {
    font-weight: 500;
    flex-grow: 1;
}

.boat-paddler-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.85em;
    color: #6c757d;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar styling */
.boat-paddler-list::-webkit-scrollbar {
    width: 6px;
}

.boat-paddler-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.boat-paddler-list::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 3px;
}

.boat-paddler-list::-webkit-scrollbar-thumb:hover {
    background-color: #a8a8a8;
}

/* Add these styles to boat.css */
.remove-paddler-button {
    position: absolute;
    top: 5px;
    right: 30px; /* Position it to the left of the dropdown button */
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
    z-index: 3;
    font-size: 12px;
    color: var(--danger-color);
}

.seat-paddler:hover .remove-paddler-button {
    opacity: 0.8;
}

.remove-paddler-button:hover {
    opacity: 1 !important;
    background-color: var(--danger-color);
    color: white;
}

/* Add these styles to boat.css */

/* Fix button styles */
.seat-fix-button {
    position: absolute;
    top: 5px;
    right: 30px; /* Position it to the left of the dropdown button */
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.2s, background-color 0.2s;
    z-index: 3;
}

.seat:hover .seat-fix-button {
    opacity: 1;
}

.seat-fix-button:hover {
    background-color: var(--primary-color);
}

.seat.fixed .seat-fix-button {
    opacity: 1;
    background-color: var(--success-color);
    color: white;
}

/* Move the remove button position to account for the fix button */
.remove-paddler-button {
    right: 55px; /* Moved further to the left to make room for both buttons */
}

/* Make buttons more touch-friendly on mobile */
@media (max-width: 768px) {
    .seat-dropdown-button,
    .seat-fix-button,
    .remove-paddler-button {
        width: 32px;
        height: 32px;
        opacity: 1;
    }
    
    .seat-fix-button {
        right: 36px;
    }
    
    .remove-paddler-button {
        right: 72px;
    }
}

/* Responsive design for boat statistics */
@media (max-width: 1200px) {
    .stats-compact {
        gap: 10px;
    }
    
    .stat-item {
        min-width: 55px;
        padding: 6px 8px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 9px;
    }
}

@media (max-width: 768px) {
    .boat-section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .instructions-panel {
        padding: 15px;
    }
    
    .instruction-item {
        font-size: 13px;
    }
    
    .stats-compact {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .stat-item {
        min-width: 50px;
        padding: 6px 8px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    .stat-label {
        font-size: 8px;
    }
    
    .stat-separator {
        display: none;
    }
    
    .boat-layout-wrapper {
        padding: 15px;
    }
}