/**
 * Component Styles
 */

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
    padding: var(--lh-spacing-md) 0;
    font-size: 0.875rem;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: var(--lh-gray);
}

.breadcrumb-item a {
    color: var(--lh-gray);
}

.breadcrumb-item a:hover {
    color: var(--lh-primary);
}

.breadcrumb-item.active {
    color: var(--lh-dark-gray);
}

/* ==========================================================================
   Star Rating
   ========================================================================== */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating .star {
    color: var(--lh-light-gray);
}

.star-rating .star.filled {
    color: var(--lh-accent);
}

/* ==========================================================================
   Social Links
   ========================================================================== */
.social-links {
    display: flex;
    gap: var(--lh-spacing-sm);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--lh-radius-full);
    background: var(--lh-light-gray);
    color: var(--lh-dark-gray);
    transition: all var(--lh-transition-normal);
}

.social-link:hover {
    background: var(--lh-primary);
    color: var(--lh-white);
}

.section--dark .social-link {
    background: rgba(255, 255, 255, 0.1);
    color: var(--lh-white);
}

.section--dark .social-link:hover {
    background: var(--lh-accent);
    color: var(--lh-black);
}

/* ==========================================================================
   Contact Info
   ========================================================================== */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--lh-spacing-md);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--lh-spacing-sm);
}

.contact-item .icon {
    flex-shrink: 0;
    color: var(--lh-primary);
}

.contact-item a {
    color: inherit;
}

.contact-item a:hover {
    color: var(--lh-primary);
}

/* ==========================================================================
   Share Buttons
   ========================================================================== */
.share-buttons {
    display: flex;
    align-items: center;
    gap: var(--lh-spacing-sm);
}

.share-label {
    font-size: 0.875rem;
    color: var(--lh-gray);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--lh-radius-sm);
    color: var(--lh-white);
    transition: all var(--lh-transition-fast);
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-facebook {
    background: #1877f2;
}

.share-twitter {
    background: #1da1f2;
}

.share-linkedin {
    background: #0a66c2;
}

/* ==========================================================================
   Back to Top
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--lh-primary);
    color: var(--lh-white);
    border: none;
    border-radius: var(--lh-radius-full);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--lh-transition-normal);
    box-shadow: var(--lh-shadow-md);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--lh-primary-dark);
    transform: translateY(-3px);
}

/* ==========================================================================
   Form Messages
   ========================================================================== */
.form-success,
.form-error {
    padding: var(--lh-spacing-lg);
    border-radius: var(--lh-radius-md);
    text-align: center;
}

.form-success {
    background: var(--lh-success);
    color: var(--lh-white);
}

.form-success h4,
.form-success p {
    color: var(--lh-white);
    margin-bottom: var(--lh-spacing-sm);
}

.success-icon {
    margin-bottom: var(--lh-spacing-md);
}

.success-icon svg {
    color: var(--lh-white);
}

.form-error {
    background: #ffebee;
    color: var(--lh-error);
    border: 1px solid var(--lh-error);
}

/* ==========================================================================
   Loading States
   ========================================================================== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--lh-light-gray);
    border-top-color: var(--lh-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn.loading {
    color: transparent;
}

/* ==========================================================================
   Tooltips
   ========================================================================== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 0.5rem 0.75rem;
    background: var(--lh-dark-gray);
    color: var(--lh-white);
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: var(--lh-radius-sm);
    opacity: 0;
    visibility: hidden;
    transition: all var(--lh-transition-fast);
    z-index: 100;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: var(--lh-radius-sm);
}

.badge--primary {
    background: var(--lh-primary);
    color: var(--lh-white);
}

.badge--success {
    background: var(--lh-success);
    color: var(--lh-white);
}

.badge--warning {
    background: var(--lh-warning);
    color: var(--lh-black);
}

.badge--error {
    background: var(--lh-error);
    color: var(--lh-white);
}

.badge--outline {
    background: transparent;
    border: 1px solid currentColor;
}

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
    padding: var(--lh-spacing-md);
    border-radius: var(--lh-radius-sm);
    margin-bottom: var(--lh-spacing-md);
}

.alert--info {
    background: #e0f7fa;
    color: #006064;
    border-left: 4px solid var(--lh-info);
}

.alert--success {
    background: #e8f5e9;
    color: #1b5e20;
    border-left: 4px solid var(--lh-success);
}

.alert--warning {
    background: #fff8e1;
    color: #f57c00;
    border-left: 4px solid var(--lh-warning);
}

.alert--error {
    background: #ffebee;
    color: #b71c1c;
    border-left: 4px solid var(--lh-error);
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--lh-spacing-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--lh-transition-normal);
    z-index: 9999;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--lh-white);
    border-radius: var(--lh-radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform var(--lh-transition-normal);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--lh-spacing-lg);
    border-bottom: 1px solid var(--lh-light-gray);
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--lh-gray);
    padding: 0.5rem;
    transition: color var(--lh-transition-fast);
}

.modal-close:hover {
    color: var(--lh-dark-gray);
}

.modal-body {
    padding: var(--lh-spacing-lg);
}

.modal-footer {
    display: flex;
    gap: var(--lh-spacing-sm);
    justify-content: flex-end;
    padding: var(--lh-spacing-lg);
    border-top: 1px solid var(--lh-light-gray);
}

/* ==========================================================================
   Tabs
   ========================================================================== */
.tabs {
    border-bottom: 1px solid var(--lh-light-gray);
    margin-bottom: var(--lh-spacing-lg);
}

.tabs-list {
    display: flex;
    gap: var(--lh-spacing-lg);
    list-style: none;
    margin: 0;
    padding: 0;
}

.tab-link {
    display: block;
    padding: var(--lh-spacing-md) 0;
    color: var(--lh-gray);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--lh-transition-fast);
}

.tab-link:hover {
    color: var(--lh-primary);
}

.tab-link.active {
    color: var(--lh-primary);
    border-bottom-color: var(--lh-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--lh-spacing-xs);
    margin-top: var(--lh-spacing-xl);
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--lh-spacing-sm);
    background: var(--lh-white);
    color: var(--lh-dark-gray);
    border: 1px solid var(--lh-light-gray);
    border-radius: var(--lh-radius-sm);
    text-decoration: none;
    transition: all var(--lh-transition-fast);
}

.pagination .page-numbers:hover {
    background: var(--lh-off-white);
    border-color: var(--lh-primary);
}

.pagination .page-numbers.current {
    background: var(--lh-primary);
    color: var(--lh-white);
    border-color: var(--lh-primary);
}

.pagination .prev,
.pagination .next {
    font-weight: 600;
}
