/* Planes de ocio Block Styles */

.tarambana-planes-ocio-title {
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 40px 0 30px 0;
    letter-spacing: 1px;
}

.tarambana-planes-ocio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 2fr;
    gap: 2px;
    margin: 30px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.tarambana-planes-ocio-col {
    position: relative;
    margin-top: 10px;
}

/* Make first three columns smaller */
.tarambana-planes-ocio-col:nth-child(1),
.tarambana-planes-ocio-col:nth-child(2),
.tarambana-planes-ocio-col:nth-child(3) {
    transform: scale(0.9);
    transform-origin: center center;
}

/* YouTube column takes remaining space */
.tarambana-planes-ocio-col:nth-child(4) {
    grid-column: span 1;
    top: 17px;
}

.tarambana-planes-ocio-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.tarambana-planes-ocio-link:hover {
    transform: translateY(-5px);
}

.tarambana-planes-ocio-card {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Ensure all cards have the same height */
.tarambana-planes-ocio-col:nth-child(1) .tarambana-planes-ocio-card,
.tarambana-planes-ocio-col:nth-child(2) .tarambana-planes-ocio-card,
.tarambana-planes-ocio-col:nth-child(3) .tarambana-planes-ocio-card {
    height: 333px; /* 300px / 0.9 = 333px to compensate for scale */
}

.tarambana-planes-ocio-col:nth-child(4) .tarambana-planes-ocio-card {
    height: 300px; /* Original height for YouTube */
    max-height: 300px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

.tarambana-planes-ocio-card:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.tarambana-planes-ocio-card .bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.tarambana-planes-ocio-card:hover .bg {
    opacity: 0.8;
}

.tarambana-planes-ocio-card .content {
    position: relative;
    z-index: 2;
    padding: 25px;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tarambana-planes-ocio-card h3 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(49, 49, 49, 0.5);
    padding-top: 60px;
}

.tarambana-planes-ocio-card p {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    padding-bottom: 20px;
    max-width: 90%;
    padding-bottom: 50px;
    white-space: pre-line; /* This will convert \n to line breaks */
}

/* YouTube specific styling */
.tarambana-planes-ocio-card.youtube {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

.tarambana-planes-ocio-card.youtube .youtube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    max-height: 300px;
    object-fit: cover;
    transform: translateY(0);
}

.tarambana-planes-ocio-card.youtube .bg {
    display: none;
}

.tarambana-planes-ocio-card.youtube .content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    pointer-events: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .tarambana-planes-ocio-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        margin: 20px 0;
    }
    
    /* Reset scale on mobile */
    .tarambana-planes-ocio-col:nth-child(1),
    .tarambana-planes-ocio-col:nth-child(2),
    .tarambana-planes-ocio-col:nth-child(3),
    .tarambana-planes-ocio-col:nth-child(4) {
        transform: none;
    }
    
    .tarambana-planes-ocio-card {
        height: 250px;
    }
    
    .tarambana-planes-ocio-card h3 {
        font-size: 1.2rem;
    }
    
    .tarambana-planes-ocio-card p {
        font-size: 0.8rem;
    }
}

@media (max-width: 650px) {
    .tarambana-planes-ocio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tarambana-planes-ocio-card {
        height: 200px;
    }
    
    .tarambana-planes-ocio-card .content {
        padding: 20px;
    }
    
    .tarambana-planes-ocio-card h3 {
        font-size: 1.1rem;
    }
}

/* Buy Tickets Block Styling */
.tarambana-buy-tickets-block {
    position: absolute;
    top: 5px;
    left: -20px;
    z-index: 20;
}

.ticket-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.ticket-link:hover {
    transform: scale(1.05);
}

.ticket-stub {
    position: relative;
    min-width: 120px;
    text-align: center;
    /* Remove background and border since we're using SVG */
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

/* SVG styling - remove pseudo-elements since SVG handles the design */
.ticket-stub::before,
.ticket-stub::after {
    display: none;
}

/* SVG content styling */
.ticket-stub svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 150px;
    position: relative;
    z-index: 1;
}

/* Fallback styles for when SVG is not available */
.ticket-stub .perforation {
    content: '';
    position: absolute;
    right: 25px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: repeating-linear-gradient(
        to bottom,
        #fff 0,
        #fff 4px,
        transparent 4px,
        transparent 8px
    );
}

/* Text styles - positioned over SVG */
.ticket-text-small {
    position: absolute;
    top: 40%;
    left: 32%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 2;
    margin-top: -8px;
}

.ticket-text-large {
    position: absolute;
    top: 45%;
    left: 45%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    z-index: 2;
    margin-top: 8px;
}

/* Responsive adjustments for ticket block */
@media (max-width: 768px) {    
    .ticket-stub {
        padding: 10px 16px;
        min-width: 100px;
    }
    
    .ticket-text-small {
        font-size: 0.7rem;
    }
    
    .ticket-text-large {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .tarambana-buy-tickets-block {
        top: 10px;
        right: 10px;
    }
    
    .ticket-stub {
        padding: 8px 12px;
        min-width: 80px;
    }
    
    .ticket-text-small {
        font-size: 0.6rem;
    }
    
    .ticket-text-large {
        font-size: 0.9rem;
    }
}

@media (max-width: 650px) {
    .tarambana-buy-tickets-block {
        top: 8px;
        left: -30px;
    }
    
    .ticket-stub {
        padding: 5px 8px;
        min-width: 60px;
    }
    
    .ticket-text-small {
        font-size: 0.5rem;
    }
    
    .ticket-text-large {
        font-size: 0.8rem;
    }
}

/* Image Selector Styles */
.image-selector-wrapper {
    margin-bottom: 15px;
}

.image-selector-wrapper .components-base-control__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1e1e1e;
}

.image-selector {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background: #f9f9f9;
}

.image-selector-content {
    text-align: center;
}

.selected-image {
    margin-bottom: 10px;
}

.selected-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Editor Styles */
.tarambana-planes-ocio .editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 2fr;
    gap: 15px;
    margin: 20px 0;
    max-width: 1200px;
}

.tarambana-planes-ocio .item-column {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    min-height: 200px;
    position: relative;
}

.tarambana-planes-ocio .item-column-1,
.tarambana-planes-ocio .item-column-2,
.tarambana-planes-ocio .item-column-3 {
    transform: scale(0.9);
    transform-origin: center center;
}

.tarambana-planes-ocio .item-column-4 {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
}

.tarambana-planes-ocio .column-header {
    margin-bottom: 15px;
    text-align: center;
}

.tarambana-planes-ocio .column-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.tarambana-planes-ocio .item-column-4 .column-header h4 {
    color: white;
}

.tarambana-planes-ocio .column-content {
    flex: 1;
}

.tarambana-planes-ocio .remove-button {
    margin-top: 15px;
    width: 100%;
}

.tarambana-planes-ocio .no-items {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
}

/* Responsive editor */
@media (max-width: 768px) {
    .tarambana-planes-ocio .editor-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .tarambana-planes-ocio .item-column-1,
    .tarambana-planes-ocio .item-column-2,
    .tarambana-planes-ocio .item-column-3 {
        transform: none;
    }
}

@media (max-width: 650px) {
    .tarambana-planes-ocio .editor-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Remove debug styling */
.tarambana-planes-ocio-debug {
    display: none !important;
}

/* Searchable Select Control Styles */
.searchable-select-control {
    margin-bottom: 16px;
}

.searchable-select-control .components-base-control__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1e1e1e;
}

.searchable-select-wrapper {
    position: relative;
    width: 100%;
}

.searchable-select-button {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    color: #2c3338;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.searchable-select-button:hover {
    border-color: #2271b1;
}

.searchable-select-button:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.searchable-select-button.is-open {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.searchable-select-button.is-disabled {
    background-color: #f6f7f7;
    color: #a7aaad;
    cursor: not-allowed;
}

.searchable-select-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchable-select-arrow {
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.2s ease;
    color: #8c8f94;
}

.searchable-select-button.is-open .searchable-select-arrow {
    transform: rotate(180deg);
}

.searchable-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #8c8f94;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow: hidden;
}

.searchable-select-search {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.searchable-select-search-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
}

.searchable-select-search-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.searchable-select-options {
    max-height: 200px;
    overflow-y: auto;
}

.searchable-select-option {
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #2c3338;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: block;
}

.searchable-select-option:hover {
    background-color: #f0f0f1;
}

.searchable-select-option.is-selected {
    background-color: #2271b1;
    color: #fff;
}

.searchable-select-option.is-selected:hover {
    background-color: #135e96;
}

.searchable-select-no-results,
.searchable-select-loading {
    padding: 12px;
    text-align: center;
    color: #8c8f94;
    font-size: 14px;
    font-style: italic;
}

.searchable-select-loading {
    color: #2271b1;
}

/* Responsive adjustments for searchable select */
@media (max-width: 768px) {
    .searchable-select-dropdown {
        max-height: 250px;
    }
    
    .searchable-select-options {
        max-height: 150px;
    }
}

