/* Maine Cruise Manager Frontend Styles */

/* General Styles */
.mcm-cruise-schedule,
.mcm-work-order-board,
.mcm-next-arrivals {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 20px 0;
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mcm-cruise-schedule h3,
.mcm-work-order-board h3,
.mcm-next-arrivals h3 {
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Cruise Schedule Table */
.mcm-schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.mcm-schedule-table th,
.mcm-schedule-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

.mcm-schedule-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #0073aa;
}

.mcm-schedule-table tr:hover {
    background-color: #f8f9fa;
}

.mcm-schedule-table tr:nth-child(even) {
    background-color: #fafafa;
}

/* Work Order Board */
.mcm-work-order-item {
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s ease;
}

.mcm-work-order-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.mcm-work-order-item h4 {
    color: #0073aa;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.mcm-work-order-item p {
    margin: 5px 0;
    color: #555;
}

.mcm-work-order-item strong {
    color: #333;
}

/* Status Indicators */
.status-pending {
    color: #f56500;
    font-weight: bold;
}

.status-active {
    color: #00a32a;
    font-weight: bold;
}

.status-completed {
    color: #666;
    font-weight: bold;
}

.status-pending::before {
    content: "●";
    margin-right: 5px;
}

.status-active::before {
    content: "●";
    margin-right: 5px;
}

.status-completed::before {
    content: "●";
    margin-right: 5px;
}

/* Next Arrivals List */
.mcm-arrivals-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mcm-arrivals-list li {
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.mcm-arrivals-list li:hover {
    background: #e8f4fd;
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.mcm-arrivals-list li strong {
    display: block;
    color: #0073aa;
    font-size: 16px;
    margin-bottom: 5px;
}

.mcm-arrivals-list li small {
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mcm-schedule-table {
        font-size: 14px;
    }
    
    .mcm-schedule-table th,
    .mcm-schedule-table td {
        padding: 8px 10px;
    }
    
    .mcm-cruise-schedule,
    .mcm-work-order-board,
    .mcm-next-arrivals {
        padding: 15px;
        margin: 10px 0;
    }
    
    .mcm-work-order-item {
        padding: 12px;
    }
    
    .mcm-arrivals-list li {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .mcm-schedule-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .mcm-schedule-table th:nth-child(3),
    .mcm-schedule-table td:nth-child(3),
    .mcm-schedule-table th:nth-child(4),
    .mcm-schedule-table td:nth-child(4) {
        display: none;
    }
    
    .mcm-work-order-item h4 {
        font-size: 16px;
    }
}

/* Loading and Error States */
.mcm-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.mcm-loading::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.mcm-error {
    background: #fff2f2;
    border: 1px solid #ff6b6b;
    color: #c92a2a;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
}

.mcm-success {
    background: #f2fff2;
    border: 1px solid #51cf66;
    color: #2b8a3e;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ship Type Icons */
.ship-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

.ship-type-cruise::before {
    content: "🚢";
    font-size: 18px;
}

.ship-type-small::before {
    content: "⛵";
    font-size: 18px;
}

.ship-type-cargo::before {
    content: "🚛";
    font-size: 18px;
}

/* Priority Indicators */
.priority-high {
    border-left: 4px solid #ff6b6b;
}

.priority-medium {
    border-left: 4px solid #ffd43b;
}

.priority-low {
    border-left: 4px solid #51cf66;
}

/* Filter Controls */
.mcm-filters {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #e1e1e1;
}

.mcm-filters label {
    display: inline-block;
    margin-right: 20px;
    font-weight: 600;
    color: #555;
}

.mcm-filters select,
.mcm-filters input {
    margin-left: 8px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Accessibility */
.mcm-cruise-schedule:focus,
.mcm-work-order-board:focus,
.mcm-next-arrivals:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.mcm-schedule-table th {
    position: relative;
}

.mcm-schedule-table th[aria-sort="ascending"]::after {
    content: "▲";
    position: absolute;
    right: 8px;
    font-size: 12px;
}

.mcm-schedule-table th[aria-sort="descending"]::after {
    content: "▼";
    position: absolute;
    right: 8px;
    font-size: 12px;
}

/* Print Styles */
@media print {
    .mcm-cruise-schedule,
    .mcm-work-order-board,
    .mcm-next-arrivals {
        box-shadow: none;
        border: 1px solid #000;
        page-break-inside: avoid;
    }
    
    .mcm-work-order-item {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 10px;
    }
    
    .mcm-schedule-table {
        border-collapse: collapse;
    }
    
    .mcm-schedule-table th,
    .mcm-schedule-table td {
        border: 1px solid #000;
    }
}