/**
 * Salem World Core - Frontend Styles
 */

/* Booking Widget */
.sw-booking-widget {
    max-width: 100%;
}

.sw-booking-form .sw-form-group {
    margin-bottom: 1.25rem;
}

/* Time Slots */
.sw-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
}

.sw-time-slot {
    padding: 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.sw-time-slot:hover:not(.unavailable) {
    border-color: #7c3aed;
    background: rgba(124, 58, 237, 0.05);
}

.sw-time-slot.selected {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}

.sw-time-slot.unavailable {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Library */
.sw-library-grid {
    display: grid;
    gap: 1.5rem;
}

.sw-library-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
}

.sw-library-thumbnail {
    width: 120px;
    flex-shrink: 0;
}

.sw-library-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.sw-library-info {
    flex: 1;
}

.sw-library-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
}

.sw-library-info p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.sw-library-downloads {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Appointments */
.sw-appointments-list {
    display: grid;
    gap: 1rem;
}

.sw-appointment-item .sw-card-body {
    padding: 1.5rem;
}

.sw-appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sw-appointment-header h3 {
    margin: 0;
}

.sw-appointment-details p {
    margin: 0.25rem 0;
}

.sw-meeting-link {
    margin-top: 1rem;
}

/* Status Badges */
.sw-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sw-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.sw-status-confirmed {
    background: #d1fae5;
    color: #065f46;
}

.sw-status-completed {
    background: #e0e7ff;
    color: #3730a3;
}

.sw-status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* Protected Content */
.sw-protected-content {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.sw-content-preview {
    position: relative;
}

.sw-content-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}

/* Loading State */
.sw-loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.sw-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

[dir="ltr"] .sw-loading::after {
    margin-right: 0;
    margin-left: 0.5rem;
}

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

/* RTL Support */
[dir="rtl"] .sw-library-item,
[dir="rtl"] .sw-appointment-header {
    direction: rtl;
}

/* Responsive */
@media (max-width: 576px) {
    .sw-library-item {
        flex-direction: column;
    }
    
    .sw-library-thumbnail {
        width: 100%;
        max-width: 150px;
    }
    
    .sw-time-slots {
        grid-template-columns: repeat(3, 1fr);
    }
}
