/**
 * Profitroom Offers Integration
 * Frontend Styles - Horizontal Layout
 */

/* Container */


[type=button]:focus, [type=button]:hover, [type=submit]:focus, [type=submit]:hover, button:focus, button:hover {
    background-color: #546D71 !important;
    color: #fff;
    text-decoration: none;
}


.profitroom-offers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grid Layout - Default to horizontal for single offers */
.profitroom-offers-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

/* Offer Card - Horizontal Layout */
.profitroom-offer-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    max-width: 100%;
}

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

/* Offer Image - Left side, fixed width */
.profitroom-offer-card .offer-image {
    width: 40%;
    min-width: 400px;
    height: auto;
    min-height: 400px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
}

.profitroom-offer-card .offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profitroom-offer-card:hover .offer-image img {
    transform: scale(1.05);
}

/* Offer Content - Right side, flexible */
.profitroom-offer-card .offer-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Offer Title */
.profitroom-offer-card .offer-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
    line-height: 1.3;
}

/* Summary */
.profitroom-offer-card .offer-summary {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 20px 0;
    font-style: italic;
}

/* Price */
.profitroom-offer-card .offer-price {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.profitroom-offer-card .offer-price .price-currency {
    font-size: 18px;
    font-weight: 400;
    color: #666;
}

.profitroom-offer-card .offer-price .price-nights {
    font-size: 16px;
    font-weight: 400;
    color: #777;
}

/* Minimum Nights */
.profitroom-offer-card .offer-min-nights {
    font-size: 15px;
    color: #555;
    margin: 0 0 20px 0;
    padding: 10px 15px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
    display: none !important;
    align-self: flex-start;
}

.profitroom-offer-card .offer-min-nights .min-nights-label {
    font-weight: 600;
    margin-right: 5px; display: none !important;
}

/* Tags */
.profitroom-offer-card .offer-tags {
    display: none;
}

.profitroom-offer-card .offer-tag {
    display: inline-block;
    padding: 6px 16px;
    background: #e8f4f8;
    color: #0277bd;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Description */
.profitroom-offer-card .offer-description {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 15px 0;
}

.profitroom-offer-card .offer-description p {
    margin: 0 0 10px 0;
}

.profitroom-offer-card .offer-description p:last-child {
    margin-bottom: 0;
}

.profitroom-offer-card .offer-description ul {
    margin: 10px 0;
    padding-left: 20px;
}

.profitroom-offer-card .offer-description li {
    margin-bottom: 8px;
}

.profitroom-offer-card .offer-description strong {
    color: #333;
}

/* Details Toggle */
.profitroom-offer-card .offer-details-toggle {
    margin: 20px 0;
}

.profitroom-offer-card .toggle-details-btn {
    width: 100%;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid #546D71;
    border-radius: 0px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #546D71;
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profitroom-offer-card .toggle-details-btn:hover {
    background: #546D71;
    border-color: #546D71;
}

.profitroom-offer-card .toggle-details-btn .toggle-icon {
    font-size: 22px;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.profitroom-offer-card .toggle-details-btn.active .toggle-icon {
    transform: rotate(45deg);
}

/* Details Content */
.profitroom-offer-card .offer-details-content {
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.profitroom-offer-card .offer-details-content h4 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333;
}

.profitroom-offer-card .offer-benefits {
    margin-bottom: 15px;
}

.profitroom-offer-card .offer-benefits ul {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.profitroom-offer-card .offer-benefits li {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 8px;
}

/* Booking Actions */
.profitroom-offer-card .offer-actions {
    margin-top: auto;
    padding-top: 20px;
}

.profitroom-offer-card .book-offer-btn {
    display: inline-block;
    width: 100%;
    padding: 16px 24px;
    background: #546D71;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    border-radius: 0px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.profitroom-offer-card .book-offer-btn:hover {
    background: #546D71;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
    color: #ffffff;
}

.profitroom-offer-card .book-offer-btn:active {
    transform: translateY(0);
}

/* Sidebar booking method specific styling */
.profitroom-offer-card .book-offer-btn.book-sidebar {
    background: #546D71;
}

.profitroom-offer-card .book-offer-btn.book-sidebar:hover {
    background: #546D71;
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3);
}

/* Error and Empty States */
.profitroom-offers-error,
.profitroom-offers-empty {
    padding: 30px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.profitroom-offers-error p,
.profitroom-offers-empty p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.profitroom-offers-error {
    background: #fee;
    border-color: #fcc;
}

.profitroom-offers-error p {
    color: #c33;
}

/* Loading State */
.profitroom-offers-loading {
    text-align: center;
    padding: 40px;
}

.profitroom-offers-loading::before {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Adjustments */
@media (max-width: 992px) {
    .profitroom-offer-card .offer-image {
        min-width: 350px;
        width: 45%;
    }
    
    .profitroom-offer-card .offer-content {
        padding: 25px;
    }
    
    .profitroom-offer-card .offer-title {
        font-size: 24px;
    }
    
    .profitroom-offer-card .offer-price {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    /* Stack vertically on tablet and mobile */
    .profitroom-offer-card {
        flex-direction: column;
    }
    
    .profitroom-offer-card .offer-image {
        width: 100%;
        min-width: 100%;
        height: 250px;
        min-height: 250px;
    }
    
    .profitroom-offer-card .offer-content {
        padding: 20px;
    }
    
    .profitroom-offer-card .offer-title {
        font-size: 22px;
    }
    
    .profitroom-offer-card .offer-price {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .profitroom-offers-container {
        padding: 0 15px;
    }
    
    .profitroom-offer-card .offer-content {
        padding: 15px;
    }
    
    .profitroom-offer-card .offer-title {
        font-size: 20px;
    }
    
    .profitroom-offer-card .offer-price {
        font-size: 24px;
    }
    
    .profitroom-offer-card .offer-tags {
        display:none;
    }
    
    .profitroom-offer-card .offer-tag {
        font-size: 11px;
        padding: 4px 12px;
    }
    
    .profitroom-offer-card .book-offer-btn {
        font-size: 16px;
        padding: 14px 20px;
    }
}

/* Accessibility */
.profitroom-offer-card .toggle-details-btn:focus,
.profitroom-offer-card .book-offer-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .profitroom-offer-card {
        flex-direction: column;
    }
    
    .profitroom-offer-card .offer-image {
        width: 100%;
        height: auto;
    }
    
    .profitroom-offer-card .offer-actions,
    .profitroom-offer-card .offer-details-toggle {
        display: none;
    }
    
    .profitroom-offer-card .offer-details-content {
        display: block !important;
    }
}