/* Container for all tours */
.tpc-tour-listing {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Individual tour card */
.tpc-tour-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    flex: 1 1 320px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    background-color: #ffffff;
    box-sizing: border-box;
}

/* Header section */
.tpc-tour-header {
    margin-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.tpc-tour-title {
    margin: 0 0 6px;
    font-size: 1.25rem;
}

.tpc-tour-location,
.tpc-tour-duration,
.tpc-tour-base-prices {
    margin: 2px 0;
    font-size: 0.9rem;
}

/* Form layout */
.tpc-calculator-form {
    margin-top: 8px;
}

.tpc-form-row {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.tpc-form-row label {
    font-size: 0.9rem;
    font-weight: 500;
}

.tpc-field-hint {
    font-size: 0.75rem;
    color: #666;
    font-weight: normal;
    font-style: italic;
    margin-left: 4px;
}

.tpc-form-row input[type="number"],
.tpc-form-row input[type="date"],
.tpc-form-row select {
    margin-top: 4px;
    padding: 6px 8px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

.tpc-form-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* Button */
.tpc-calc-button {
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.tpc-calc-button:hover,
.tpc-calc-button:focus {
    background-color: #005f8d;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tpc-calc-button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Messages */
.tpc-result-message {
    margin-top: 6px;
    font-size: 0.95rem;
}

.tpc-result-message.tpc-error {
    color: #d63638;
}

.tpc-result-message.tpc-success {
    color: #008a20;
}

.tpc-result-message.tpc-info {
    color: #2271b1;
}

/* Breakdown list */
.tpc-price-breakdown {
    margin-top: 6px;
    font-size: 0.85rem;
}

.tpc-breakdown-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
}

.tpc-breakdown-list li {
    margin-bottom: 2px;
}

/* Search Filter Styles */
.tpc-search-filter {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f7f7f7;
    border-radius: 8px;
}

.tpc-search-form {
    margin: 0;
}

.tpc-filter-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.tpc-filter-field {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
}

.tpc-filter-field label {
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #333;
}

.tpc-filter-select {
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.tpc-filter-submit {
    flex: 0 0 auto;
}

.tpc-search-button {
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.tpc-search-button:hover,
.tpc-search-button:focus {
    background-color: #005f8d;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Search Results Grid - 4 Columns */
.tpc-search-results {
    margin-top: 20px;
}

.tpc-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.tpc-result-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tpc-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tpc-result-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.tpc-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tpc-placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    color: #666;
    font-size: 0.9rem;
}

.tpc-result-content {
    padding: 16px;
}

.tpc-result-title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    line-height: 1.4;
}

.tpc-result-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tpc-result-title a:hover {
    color: #0073aa;
}

.tpc-result-location {
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: #666;
}

.tpc-result-price {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.tpc-price-info {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
}

.tpc-adult-price,
.tpc-child-price {
    font-weight: 500;
    color: #0073aa;
}

.tpc-price-separator {
    color: #999;
    margin: 0 4px;
}

.tpc-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1rem;
}

/* Responsive: 4 columns to 2 columns on tablets */
@media (max-width: 1024px) {
    .tpc-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: 2 columns to 1 column on mobile */
@media (max-width: 600px) {
    .tpc-tour-listing {
        flex-direction: column;
    }

    .tpc-tour-card {
        flex: 1 1 100%;
    }

    .tpc-results-grid {
        grid-template-columns: 1fr;
    }

    .tpc-filter-row {
        flex-direction: column;
    }

    .tpc-filter-field {
        flex: 1 1 100%;
    }

    .tpc-filter-submit {
        width: 100%;
    }

    .tpc-search-button {
        width: 100%;
    }
}

/* Location-Only Search Filter (Image Reference Design) */
.tpc-location-search-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.tpc-location-search-form {
    margin: 0;
}

.tpc-location-search-field {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.tpc-location-search-field:focus-within {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #0073aa;
}

.tpc-location-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    color: #666;
    pointer-events: none;
    z-index: 1;
}

.tpc-location-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 60px 14px 48px;
    font-size: 1rem;
    color: #333;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
}

.tpc-location-input::placeholder {
    color: #999;
    font-size: 1rem;
}

.tpc-location-input:focus {
    outline: none;
}

/* Select dropdown styling for location search */
.tpc-location-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px;
    padding-right: 45px;
    cursor: pointer;
}

.tpc-location-select option {
    padding: 8px 12px;
    background-color: #fff;
    color: #333;
}

/* Ensure select dropdown has proper styling */
.tpc-location-select::-ms-expand {
    display: none; /* Hide default arrow in IE */
}

.tpc-location-select:focus {
    outline: none;
    border-color: #0073aa;
}

.tpc-location-search-button {
    position: absolute;
    right: 8px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background-color: #0073aa;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
    padding: 0;
}

.tpc-location-search-button:hover {
    background-color: #005f8d;
    transform: scale(1.05);
}

.tpc-location-search-button:active {
    transform: scale(0.95);
}

.tpc-search-icon {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
    stroke-width: 2;
    fill: none;
}

/* Responsive adjustments for location search */
@media (max-width: 600px) {
    .tpc-location-search-wrapper {
        max-width: 100%;
    }

    .tpc-location-input {
        font-size: 0.9rem;
        padding: 12px 16px 12px 44px;
    }

    .tpc-location-icon {
        left: 14px;
        width: 18px;
        height: 18px;
    }

    .tpc-location-search-button {
        width: 40px;
        height: 40px;
        right: 6px;
    }

    .tpc-search-icon {
        width: 18px;
        height: 18px;
    }
}

/* Pagination Styles */
.tpc-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tpc-pagination-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.tpc-pagination-item {
    margin: 0;
    padding: 0;
}

.tpc-pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #ffffff;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 6px;
}

.tpc-pagination-link:hover {
    background-color: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.tpc-pagination-link:active {
    transform: translateY(0);
}

.tpc-pagination-current {
    background-color: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
    cursor: default;
    font-weight: 600;
}

.tpc-pagination-current:hover {
    background-color: #0073aa;
    color: #ffffff;
    transform: none;
    box-shadow: none;
}

.tpc-pagination-prev,
.tpc-pagination-next {
    padding: 8px 16px;
    min-width: auto;
}

.tpc-pagination-prev svg,
.tpc-pagination-next svg {
    flex-shrink: 0;
}

.tpc-pagination-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0;
}

.tpc-pagination-dots span {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive pagination */
@media (max-width: 600px) {
    .tpc-pagination {
        margin-top: 30px;
    }

    .tpc-pagination-list {
        gap: 6px;
    }

    .tpc-pagination-link {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .tpc-pagination-prev,
    .tpc-pagination-next {
        padding: 6px 12px;
    }

    .tpc-pagination-prev span,
    .tpc-pagination-next span {
        display: none;
    }

    .tpc-pagination-prev svg,
    .tpc-pagination-next svg {
        width: 18px;
        height: 18px;
    }
}
