← back to Jill Website

public/css/activity-links.css

554 lines

/**
 * Activity Links Component Styles
 * Includes loading states, error states, and link display
 */

/* Container */
.activity-links-container {
    width: 100%;
    min-height: 60px;
    position: relative;
}

/* Activity Links */
.activity-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.activity-links.compact {
    gap: 0.5rem;
}

/* Individual Link */
.activity-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.activity-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.activity-link i {
    font-size: 1.1rem;
}

/* Compact mode */
.activity-links.compact .activity-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.activity-links.compact .activity-link i {
    font-size: 1rem;
}

/* Icon-only links (no labels) */
.activity-link:not(:has(span)) {
    padding: 0.75rem;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    justify-content: center;
}

.activity-links.compact .activity-link:not(:has(span)) {
    width: 40px;
    height: 40px;
    padding: 0.5rem;
}

/* Loading State */
.activity-links-loading {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.activity-links-loading.compact {
    gap: 0.5rem;
}

.activity-link-skeleton {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #f0f0f0;
    border-radius: 25px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.skeleton-icon {
    width: 20px;
    height: 20px;
    background: #e0e0e0;
    border-radius: 50%;
}

.skeleton-label {
    width: 60px;
    height: 16px;
    background: #e0e0e0;
    border-radius: 4px;
}

/* Compact skeleton */
.activity-links-loading.compact .activity-link-skeleton {
    padding: 0.5rem 1rem;
}

.activity-links-loading.compact .skeleton-icon {
    width: 16px;
    height: 16px;
}

.activity-links-loading.compact .skeleton-label {
    width: 50px;
    height: 14px;
}

/* Error State */
.activity-links-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    color: #856404;
}

.activity-links-error i {
    font-size: 1.25rem;
    color: #dc3545;
}

.activity-links-error p {
    margin: 0;
    font-size: 0.9rem;
    flex: 1;
}

.activity-links-retry-btn {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.activity-links-retry-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.activity-links-retry-btn:active {
    transform: translateY(0);
}

/* Empty State */
.activity-links-empty {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    color: #6c757d;
}

.activity-links-empty i {
    font-size: 1.25rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.activity-links-empty-content {
    flex: 1;
}

.activity-links-empty-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
}

.activity-links-empty-description {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #6c757d;
}

/* Partial Information Message */
.activity-links-partial-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    background: #fff8e1;
    border: 1px solid #ffd54f;
    border-radius: 8px;
    color: #f57c00;
    font-size: 0.85rem;
}

.activity-links-partial-info i {
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-links-partial-info p {
    margin: 0;
    line-height: 1.4;
}

/* Specific link colors */
.activity-link[title*="Call"],
.activity-link[href^="tel:"] {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.activity-link[title*="website"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.activity-link[title*="directions"],
.activity-link[title*="map"] {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.activity-link[title*="review"] {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #2d3436;
}

/* Hover effects for specific links */
.activity-link[title*="Call"]:hover,
.activity-link[href^="tel:"]:hover {
    box-shadow: 0 4px 12px rgba(56, 239, 125, 0.5);
}

.activity-link[title*="website"]:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.activity-link[title*="directions"]:hover,
.activity-link[title*="map"]:hover {
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.5);
}

.activity-link[title*="review"]:hover {
    box-shadow: 0 4px 12px rgba(253, 203, 110, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Stack links vertically on mobile */
    .activity-links {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    /* Ensure all links meet 44px minimum touch target */
    .activity-link {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
        min-height: 44px;
        width: 100%;
        justify-content: center;
    }

    .activity-link i {
        font-size: 1.125rem;
    }

    /* Icon-only mobile - ensure 44px minimum */
    .activity-link:not(:has(span)) {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Compact mode on mobile still meets touch targets */
    .activity-links.compact .activity-link {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    .activity-links-error {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .activity-links-error i {
        font-size: 1rem;
    }

    .activity-links-empty {
        padding: 0.75rem 1rem;
    }

    .activity-links-empty-title {
        font-size: 0.875rem;
    }

    .activity-links-empty-description {
        font-size: 0.8rem;
    }

    .activity-links-partial-info {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }

    /* Loading skeleton on mobile */
    .activity-links-loading {
        flex-direction: column;
        gap: 0.75rem;
    }

    .activity-link-skeleton {
        width: 100%;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .activity-links {
        gap: 0.625rem;
    }

    .activity-link {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
        min-height: 44px;
    }

    /* Maintain 44px touch target on smallest screens */
    .activity-link:not(:has(span)) {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Stack error/empty states vertically */
    .activity-links-error,
    .activity-links-empty,
    .activity-links-partial-info {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .activity-links-empty-content {
        text-align: center;
    }
}

/* Accessibility */
.activity-link:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

.activity-links-retry-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .activity-link,
    .activity-links-retry-btn {
        transition: none;
    }

    .activity-link:hover,
    .activity-links-retry-btn:hover {
        transform: none;
    }

    .activity-link-skeleton {
        animation: none;
        opacity: 0.7;
    }
}

/* Print styles */
@media print {
    .activity-links-loading,
    .activity-links-error,
    .activity-links-retry-btn {
        display: none !important;
    }

    .activity-link {
        box-shadow: none;
        background: #667eea !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    .activity-link-skeleton {
        background: #2c3e50;
    }

    .skeleton-icon,
    .skeleton-label {
        background: #34495e;
    }

    .activity-links-error {
        background: #3e2723;
        border-color: #8d6e63;
        color: #ffecb3;
    }

    .activity-links-empty {
        background: #263238;
        border-color: #455a64;
        color: #b0bec5;
    }

    .activity-links-empty-title {
        color: #cfd8dc;
    }

    .activity-links-empty-description {
        color: #b0bec5;
    }

    .activity-links-partial-info {
        background: #3e2723;
        border-color: #8d6e63;
        color: #ffecb3;
    }
}

/* Loading indicator overlay (optional alternative) */
.activity-links-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    z-index: 10;
}

.activity-links-loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Tooltip for truncated text on small screens */
.activity-link[title] {
    position: relative;
}

.activity-link[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.activity-link[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

@media (hover: hover) {
    .activity-link[title]:hover::after,
    .activity-link[title]:hover::before {
        opacity: 1;
    }
}

/* Disable tooltips on touch devices */
@media (hover: none) {
    .activity-link[title]:hover::after,
    .activity-link[title]:hover::before {
        display: none;
    }
}