.river-cruise-ship-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.river-cruise-ship-header {
    margin-bottom: 30px;
}

.river-cruise-ship-header h2 {
    font-size: 2em;
    margin-bottom: 15px;
}

.river-cruise-ship-description {
    font-size: 1.1em;
    line-height: 1.6;
    color: #666;
}

/* Deck Plan View Toggle */
.deck-plan-view-toggle {
    margin-bottom: 30px;
    text-align: center;
}

.deck-plan-toggle-btn {
    padding: 10px 20px;
    margin: 0 5px;
    border: 2px solid #0073aa;
    background: #fff;
    color: #0073aa;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.deck-plan-toggle-btn:hover {
    background: #f0f0f0;
}

.deck-plan-toggle-btn.active {
    background: #0073aa;
    color: #fff;
}

/* Complete Deck Plan View */
.complete-deck-plan-view {
    margin-bottom: 30px;
}

.complete-deck-plan-container {
    text-align: center;
    margin-bottom: 30px;
}

.complete-deck-plan-container img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Two-column layout */
.decks-layout-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Left Panel: Deck Selector */
.deck-selector-panel {
    width: 250px;
    flex-shrink: 0;
}

.deck-selector-title {
    font-size: 1.3em;
    margin-bottom: 20px;
    font-weight: 600;
    color: #333;
}

.deck-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.deck-list li {
    margin: 0;
    margin-bottom: 2px;
}

.deck-list-item {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #666;
    background: #f0f0f0;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
    cursor: pointer;
}

.deck-list-item:hover {
    background: #e0e0e0;
    color: #333;
}

.deck-list-item.active {
    background: #b3d9f2;
    color: #0066cc;
    font-weight: 500;
}

/* Right Panel: Deck Plan */
.deck-plan-panel {
    flex: 1;
    min-width: 0;
}

.river-cruise-deck-plan {
    width: 100%;
}

.river-cruise-deck-canvas {
    width: 100%;
    background: #f0f0f0;
    border-radius: 0;
    padding: 20px 0;
    margin-bottom: 20px;
    overflow-x: auto;
}

/* Deck Plan Image Container */
.deck-plan-image-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
}

.deck-plan-base-image {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
}

.deck-plan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.deck-plan-overlay > * {
    pointer-events: auto;
}

.deck-plan-base-image {
    display: block;
    width: 100%;
    height: auto;
}

.deck-plan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.river-cruise-cabin-overlay {
    pointer-events: auto;
    border: none !important;
}

/* Hide any cabin numbers in overlay - they're already in the image */
.river-cruise-cabin-overlay .cabin-number,
.river-cruise-cabin-overlay span,
.river-cruise-cabin-overlay::before,
.river-cruise-cabin-overlay::after {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.river-cruise-cabin-overlay:hover {
    opacity: 0.4 !important;
    transform: translate(-50%, -50%) scale(1.05);
    z-index: 1000 !important;
    border: none !important;
}

.river-cruise-cabin-overlay.selected {
    opacity: 0.5 !important;
    border: none !important;
    z-index: 25 !important;
}

.river-cruise-cabin-overlay[data-status="reserved"] {
    opacity: 0.3 !important;
    cursor: not-allowed;
    border: none !important;
}

.river-cruise-cabin-overlay[data-status="maintenance"] {
    opacity: 0.25 !important;
    cursor: not-allowed;
    border: none !important;
}

/* Ship Shape Layout - Blueprint Style */
.ship-shape {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-width: 800px;
    padding: 20px 0;
    gap: 0;
    margin: 0;
}

/* Stern (Left) - Slightly flattened curve */
.ship-stern {
    width: 40px;
    flex-shrink: 0;
    display: flex;
    margin: 0;
    margin-right: -2px; /* Overlap to remove gap */
}

.stern-shape {
    width: 100%;
    height: 100%;
    background-color: #b0cace;
    border: 2px solid #000;
    border-right: none; /* Remove right border to connect with body */
    border-radius: 50% 0 0 50% / 80% 0 0 80%; /* Flatter curve */
    margin: 0;
    box-sizing: border-box;
}

/* Ship Body (Center) */
.ship-body {
    flex: 1;
    background-color: #b0cace;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    border-left: none; /* Remove left border - connected to stern */
    border-right: none; /* Remove right border - connected to bow */
    padding: 0;
    position: relative;
    margin: 0;
    margin-left: -2px; /* Overlap with stern */
    margin-right: -2px; /* Overlap with bow */
    box-sizing: border-box;
}

/* Remove subtle corridor lines from modern design */
.ship-body::before,
.ship-body::after {
    display: none;
}

/* Bow (Right) - Long bullet shape */
.ship-bow {
    width: 160px; /* Longer */
    flex-shrink: 0;
    display: flex;
    margin: 0;
    margin-left: -2px; /* Overlap to remove gap */
}

.bow-shape {
    width: 100%;
    height: 100%;
    background-color: #b0cace;
    border: 2px solid #000;
    border-left: none; /* Remove left border to connect with body */
    border-radius: 0 100% 100% 0 / 0 50% 50% 0; /* Bullet shape */
    margin: 0;
    box-sizing: border-box;
}

/* Horizontal deck plan layout */
.deck-plan-layout-horizontal {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    justify-content: center; /* Center vertically */
    padding: 0;
}

.deck-row {
    display: flex;
    flex-direction: row;
    gap: 0; /* No gap between cabins */
    align-items: center;
    justify-content: flex-end; /* Push cabins to the right (bow) */
    flex-wrap: nowrap;
    height: 50px;
    padding-right: 20px; /* Space before bow */
}

.port-row {
    align-items: flex-end; /* Bottom align to touch corridor */
    margin-bottom: 0;
}

.starboard-row {
    align-items: flex-start; /* Top align to touch corridor */
    margin-top: 0;
}

/* Corridor */
.deck-corridor-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end; /* Align elements to the right */
    gap: 0;
    height: 20px;
    background-color: transparent; /* Match ship body */
    padding-right: 20px;
}

.corridor-area {
    flex: 1;
    height: 100%;
    /* No distinct background color */
}

.deck-lift {
    width: 25px;
    height: 20px;
    background-color: #e74c3c; /* Red lift */
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: normal;
    border: 1px solid #000;
    flex-shrink: 0;
    margin-right: 25px; /* Spacing from stairs */
}

.deck-stairs {
    width: 30px;
    height: 25px; /* Overlap slightly */
    position: relative;
    border: none;
    margin-right: 10px;
}

.stairs-icon {
    width: 100%;
    height: 100%;
    background: transparent;
    /* Simple stairs icon using border/lines could go here, keeping hatched pattern for now */
    background-image: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        #666 2px,
        #666 3px
    );
    border-radius: 0 15px 15px 0; /* Curved stairs shape hint */
    border: 1px solid #666;
    border-left: none;
}

/* Cabins */
.river-cruise-cabin {
    width: 28px; /* Narrow */
    height: 50px; /* Tall */
    border: 1px solid #000;
    border-right: none; /* Shared borders */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background-color: #e68aace; /* Default pink from screenshot */
    color: #000;
    font-weight: normal;
    font-size: 10px;
    position: relative;
    flex-shrink: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    box-shadow: none;
    border-radius: 0;
}

.river-cruise-cabin:first-child {
    border-right: 1px solid #000; /* Right-most cabin (first in DOM due to flex-direction) needs border */
}

.river-cruise-cabin:last-child {
    border-left: 1px solid #000;
}

/* Colors matching screenshot */
/* Pink: #d685a8, Purple: #a89bb0, Orange: #eeb075 */

.river-cruise-cabin:hover {
    background-color: #fff !important;
    z-index: 10;
    box-shadow: none;
    border: 1px solid #000;
}

.river-cruise-cabin.selected {
    background-color: #fff !important;
    box-shadow: inset 0 0 0 2px #ff6b6b;
}

.river-cruise-cabin[data-status="reserved"] {
    background-color: #e74c3c !important;
    opacity: 0.7;
    cursor: not-allowed;
}

.river-cruise-cabin[data-status="maintenance"] {
    background-color: #95a5a6 !important;
    opacity: 0.7;
    cursor: not-allowed;
}

.river-cruise-cabin .cabin-number {
    pointer-events: none;
    text-align: center;
    line-height: 1;
}

/* Deck Legend */
.deck-legend {
    margin-top: 20px;
    padding: 0;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    display: inline-block;
    width: 25px;
    height: 18px;
    border: 1px solid #333;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-label {
    font-size: 14px;
    color: #333;
}

/* Modal Styles */
.river-cruise-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.river-cruise-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
}

.river-cruise-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
}

.river-cruise-modal-close:hover,
.river-cruise-modal-close:focus {
    color: #000;
}

.reservation-cabin-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.reservation-cabin-info h3 {
    margin: 0 0 10px 0;
    color: #0073aa;
}

.reservation-cabin-info p {
    margin: 0;
    color: #666;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="date"],
.form-row input[type="number"],
.form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-row textarea {
    resize: vertical;
}

.form-row button {
    margin-right: 10px;
}

.reservation-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.reservation-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.reservation-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* HTML Deck Plan Styles */
.html-deck-plan-container {
    width: 100%;
    margin-bottom: 30px;
}

.deck-plan-canvas {
    position: relative;
    background: #f5f5f5;
    border: 2px solid #333;
    min-height: 400px;
    overflow: visible;
}

.deck-corridor {
    background: #ddd;
    border: 1px solid #999;
    z-index: 1;
}

.deck-public-area {
    background: #e8f4f8;
    border: 2px solid #0073aa;
    z-index: 2;
    padding: 5px;
    box-sizing: border-box;
    word-wrap: break-word;
    text-align: center;
}

.deck-stairs {
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        #666 2px,
        #666 3px
    );
    border: 1px solid #666;
    z-index: 3;
}

.deck-elevator {
    background: #e74c3c;
    border: 2px solid #000;
    z-index: 3;
}

.html-cabin {
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.html-cabin:hover {
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
    .decks-layout-wrapper {
        flex-direction: column;
    }
    
    .deck-selector-panel {
        width: 100%;
    }
    
    .deck-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .deck-list li {
        margin: 0;
    }
    
    .river-cruise-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .river-cruise-deck-canvas {
        padding: 10px;
    }
    
    .river-cruise-cabin {
        width: 40px;
        height: 35px;
        font-size: 9px;
    }
    
    .legend-items {
        flex-direction: column;
        gap: 10px;
    }
    
    .deck-plan-canvas {
        min-height: 300px;
    }
}

