/**
 * Hotel Links Manager - Frontend Styles
 * Modern and responsive styles for displaying hotel links
 */

/* Main Container */
.hlm-links-container {
    margin: 20px 0;
    font-family: inherit;
}

/* Grid Layout (Default) */
.hlm-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    align-items: start;
}

/* List Layout */
.hlm-layout-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Inline Layout */
.hlm-layout-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Link Item Container */
.hlm-link-item {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hlm-link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0073aa, #005177);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hlm-link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 115, 170, 0.15);
    border-color: #0073aa;
}

.hlm-link-item:hover::before {
    opacity: 1;
}

/* Link Button */
.hlm-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.hlm-link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.hlm-link-button:hover::before {
    left: 100%;
}

.hlm-link-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
}

.hlm-link-button:active {
    transform: translateY(0);
}

/* Icon Styling */
.hlm-icon {
    font-size: 18px;
    line-height: 1;
}

.hlm-label {
    flex: 1;
}

/* Contact Information */
.hlm-contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hlm-contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.hlm-contact-link:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    text-decoration: none;
    transform: translateX(2px);
}

.hlm-contact-icon {
    font-size: 16px;
    opacity: 0.8;
}

/* Platform-specific Button Colors */
.hlm-platform-booking .hlm-link-button { background: #003580; }
.hlm-platform-booking .hlm-link-button:hover { background: #002660; }

.hlm-platform-airbnb .hlm-link-button { background: #FF5A5F; }
.hlm-platform-airbnb .hlm-link-button:hover { background: #e4484d; }

.hlm-platform-expedia .hlm-link-button { background: #FFC72C; color: #333; }
.hlm-platform-expedia .hlm-link-button:hover { background: #e6b325; }

.hlm-platform-hotels .hlm-link-button { background: #D32F2F; }
.hlm-platform-hotels .hlm-link-button:hover { background: #b71c1c; }

.hlm-platform-agoda .hlm-link-button { background: #FF6600; }
.hlm-platform-agoda .hlm-link-button:hover { background: #e55a00; }

.hlm-platform-tripadvisor .hlm-link-button { background: #00AA6C; }
.hlm-platform-tripadvisor .hlm-link-button:hover { background: #008f5a; }

.hlm-platform-whatsapp .hlm-link-button { background: #25D366; }
.hlm-platform-whatsapp .hlm-link-button:hover { background: #20b858; }

.hlm-platform-website .hlm-link-button { background: #0073aa; }
.hlm-platform-website .hlm-link-button:hover { background: #005177; }

.hlm-platform-phone .hlm-link-button { background: #6c757d; }
.hlm-platform-phone .hlm-link-button:hover { background: #5a6268; }

.hlm-platform-email .hlm-link-button { background: #17a2b8; }
.hlm-platform-email .hlm-link-button:hover { background: #138496; }

.hlm-platform-other .hlm-link-button { background: #6c757d; }
.hlm-platform-other .hlm-link-button:hover { background: #5a6268; }

/* Inline Layout Specific Styles */
.hlm-layout-inline .hlm-link-item {
    flex: 0 0 auto;
    padding: 10px 15px;
    margin: 0;
}

.hlm-layout-inline .hlm-link-button {
    padding: 8px 16px;
    margin-bottom: 0;
    width: auto;
    font-size: 13px;
}

.hlm-layout-inline .hlm-contact-info {
    display: none; /* Hide contact info in inline mode */
}

/* List Layout Specific Styles */
.hlm-layout-list .hlm-link-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
}

.hlm-layout-list .hlm-link-button {
    width: auto;
    margin-bottom: 0;
    min-width: 180px;
}

.hlm-layout-list .hlm-contact-info {
    flex: 1;
    flex-direction: row;
    justify-content: flex-end;
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .hlm-link-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .hlm-contact-link {
        background: #4a5568;
        border-color: #6b7280;
        color: #e2e8f0;
    }
    
    .hlm-contact-link:hover {
        background: #6b7280;
        border-color: #9ca3af;
        color: #f7fafc;
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .hlm-layout-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .hlm-layout-list .hlm-link-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .hlm-layout-list .hlm-link-button {
        width: 100%;
    }
    
    .hlm-layout-list .hlm-contact-info {
        flex-direction: column;
        justify-content: flex-start;
    }
    
    .hlm-layout-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hlm-layout-inline .hlm-link-item {
        flex: 1;
    }
    
    .hlm-layout-inline .hlm-link-button {
        width: 100%;
    }
    
    .hlm-layout-inline .hlm-contact-info {
        display: flex; /* Show contact info on mobile even in inline mode */
    }
}

/* Print Styles */
@media print {
    .hlm-links-container {
        break-inside: avoid;
    }
    
    .hlm-link-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .hlm-link-button {
        background: white !important;
        color: black !important;
        border: 1px solid #ddd;
    }
    
    .hlm-contact-link {
        background: white;
        border: 1px solid #ddd;
    }
}

/* Animation for loading state */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hlm-link-item {
    animation: fadeInUp 0.5s ease-out;
}

.hlm-link-item:nth-child(2) { animation-delay: 0.1s; }
.hlm-link-item:nth-child(3) { animation-delay: 0.2s; }
.hlm-link-item:nth-child(4) { animation-delay: 0.3s; }
.hlm-link-item:nth-child(5) { animation-delay: 0.4s; }
.hlm-link-item:nth-child(6) { animation-delay: 0.5s; }

/* Focus styles for accessibility */
.hlm-link-button:focus,
.hlm-contact-link:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hlm-link-item {
        border-width: 2px;
    }
    
    .hlm-link-button {
        border: 2px solid currentColor;
    }
    
    .hlm-contact-link {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hlm-link-item,
    .hlm-link-button,
    .hlm-contact-link {
        transition: none;
        animation: none;
    }
    
    .hlm-link-item:hover {
        transform: none;
    }
    
    .hlm-link-button:hover {
        transform: none;
    }
} 