/**
 * Cruise AJAX Search - Card Styles
 *
 * Clean, simplified card design for AJAX-rendered cruise results
 * Uses BEM naming convention: .cruise-card__element
 * Fonts: Ranade (body text), argent-cf (title), Satoshi (meta info)
 */

/* ========================================
   LOADING SPINNER
   ======================================== */

.cruise-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    z-index: 999;
    min-height: 400px;
}

.cruise-loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    justify-content: center;
    align-items: center;
}

.cruise-loading-spinner:after {
    content: "";
    display: block;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top-color: #C89D61;
    border-radius: 50%;
    animation: cruise-spinner-rotate 0.8s linear infinite;
}

@keyframes cruise-spinner-rotate {
    to { transform: rotate(360deg); }
}

/* ========================================
   FILTER PILLS/BUTTONS
   ======================================== */

.duration-btn,
.operator-btn,
.rating-btn,
.cabin-btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-family: 'Ranade', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.duration-btn:hover,
.operator-btn:hover,
.rating-btn:hover,
.cabin-btn:hover {
    background: #f5f5f5;
    border-color: #C89D61;
}

.duration-btn.active,
.operator-btn.active,
.rating-btn.active,
.cabin-btn.active {
    background: #C89D61;
    color: #fff;
    border-color: #C89D61;
}

/* ========================================
   LOAD MORE BUTTON
   ======================================== */

.cruise-load-more-btn {
    display: block;
    margin: 40px auto;
    padding: 15px 40px;
    background: #C89D61;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Ranade', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.cruise-load-more-btn:hover {
    background: #b08950;
    transform: translateY(-2px);
}

.cruise-load-more-btn:active {
    transform: translateY(0);
}

/* ========================================
   CARD LAYOUT
   ======================================== */

.cruise-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.cruise-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.cruise-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.cruise-card__link:hover {
    text-decoration: none;
}

/* ========================================
   IMAGE SECTION
   ======================================== */

.cruise-card__image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: #f5f5f5;
}

.cruise-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cruise-card:hover .cruise-card__image img {
    transform: scale(1.05);
}

/* Ports overlay */
.cruise-card__ports {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.cruise-card__ports::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.cruise-card__port {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(200, 157, 97, 0.95);
    border-radius: 4px;
    font-family: 'Ranade', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========================================
   CONTENT SECTION
   ======================================== */

.cruise-card__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* ========================================
   HEADER (Price, Title, Operator)
   ======================================== */

.cruise-card__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cruise-card__price {
    font-size: 16px;
    color: #666;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
    font-family: 'Ranade', sans-serif;
}

.cruise-card__price-amount {
    color: #C89D61;
    font-weight: 500;
    font-size: 16px;
}

.cruise-card__title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.5;
    transition: color 0.2s ease;
    font-family: 'argent-cf', sans-serif;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    hyphens: none;
    white-space: normal;
}

.cruise-card:hover .cruise-card__title {
    color: #C89D61;
}

.cruise-card__operator {
    font-size: 16px;
    color: #666;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
    font-family: 'Satoshi', sans-serif;
}

/* ========================================
   META INFO (Nights, Date)
   ======================================== */

.cruise-card__meta {
    display: flex;
    gap: 20px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.cruise-card__meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #666;
    font-weight: 400;
    font-family: 'Satoshi', sans-serif;
}

.cruise-card__meta-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ========================================
   LOADING STATE
   ======================================== */

.cruise-loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.cruise-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #C89D61;
    border-radius: 50%;
    animation: cruise-spin 1s linear infinite;
    z-index: 10;
}

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

/* ========================================
   MESSAGES
   ======================================== */

.no-results-message,
.error-message {
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 16px;
    grid-column: 1 / -1;
    background: #f9f9f9;
    border-radius: 8px;
}

.error-message {
    color: #d32f2f;
    background: #ffebee;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .cruise-card__image {
        height: 200px;
    }

    .cruise-card__content {
        padding: 15px;
    }

    .cruise-card__meta {
        flex-direction: column;
        gap: 10px;
    }

    .cruise-card__price {
        font-size: 13px;
    }

    .cruise-card__price-amount {
        font-size: 18px;
    }

    .cruise-card__title {
        font-size: 18px;
    }
}
