/* WP Calendar Register Styles */
.wp-calendar-register-container {
    font-family: 'IRANSansXFaNum', 'Tahoma', sans-serif;
    direction: rtl;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Course Filter */
.course-filter {
    margin-bottom: 30px;
    text-align: center;
}

.course-select {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.course-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Loading Skeleton */
.loading-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.skeleton-item {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.skeleton-title {
    height: 24px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 16px;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-line:nth-child(1) { width: 80%; }
.skeleton-line:nth-child(2) { width: 60%; }
.skeleton-line:nth-child(3) { width: 70%; }

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Calendar Content */
.calendar-content {
    margin-top: 20px;
}

.subcourses-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.subcourse-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subcourse-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.subcourse-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007cba, #00a0d2);
}

.subcourse-title {
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    margin: 0;
    line-height: 1.3;
    text-align: right;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

.course-mode {
    display: inline-block;
    background: #e0e7ff;
    color: #3730a3;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.course-id {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.course-id .label {
    color: #646970;
    font-weight: 500;
}

.course-id .value {
    color: #1d2327;
    font-weight: 600;
    background: #007cba;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.datetime-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.date-item, .time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.date-item .label, .time-item .label {
    color: #646970;
    font-weight: 500;
    font-size: 14px;
}

.date-item .value, .time-item .value {
    color: #1d2327;
    font-weight: 600;
    font-size: 14px;
}

.days-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.days-label {
    font-size: 14px;
    color: #646970;
    font-weight: 500;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    justify-items: center;
}

.day-box {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 500;
    color: #646970;
    position: relative;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
}

.day-box.active {
    background: #d1f2eb;
    border-color: #0d9488;
    color: #0d9488;
}

.day-box.active .checkmark {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #0d9488;
    color: white;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
}

.capacity-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #e8f4fd;
    border-radius: 8px;
    border-right: 4px solid #007cba;
}

.capacity-info .label {
    color: #646970;
    font-weight: 500;
    font-size: 14px;
}

.capacity-info .value {
    color: #1d2327;
    font-weight: 700;
    font-size: 16px;
}

.price-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 2px solid #e6f3ff;
}

.original-price {
    text-decoration: line-through;
    color: #8c8f94;
    font-size: 14px;
    text-align: center;
}

.final-price {
    color: #00a32a;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
}



.subcourse-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 16px;
}

.status-cancelled {
    background: #fee2e2;
    color: #dc2626;
}

.status-registering {
    background: #d1f2eb;
    color: #0d9488;
    animation: blink-green 2s infinite;
}

.status-ongoing {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-completed {
    background: #fed7aa;
    color: #ea580c;
}

@keyframes blink-green {
    0%, 50% {
        background: #d1f2eb;
        color: #0d9488;
    }
    51%, 100% {
        background: #a7f3d0;
        color: #059669;
    }
}



.register-btn {
    width: 100%;
    background: linear-gradient(135deg, #007cba, #00a0d2);
    color: #fff;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    margin-top: 8px;
}

.register-btn:hover {
    background: linear-gradient(135deg, #005a87, #007cba);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.register-btn:disabled {
    background: #e1e5e9;
    color: #646970;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.register-btn.disabled {
    background: #e1e5e9;
    color: #646970;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error Message */
.error-message {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-calendar-register-container {
        padding: 15px;
        margin: 10px;
    }
    
    .subcourses-list {
        grid-template-columns: 1fr;
    }
    
    .subcourse-title {
        font-size: 18px;
    }
    
    .days-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }
    
    .day-box {
        font-size: 9px;
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
    
    .day-box.active .checkmark {
        width: 12px;
        height: 12px;
        font-size: 7px;
    }
    
    .datetime-info {
        padding: 12px;
    }
    
    .capacity-info {
        padding: 10px 12px;
    }
    
    .price-container {
        padding: 12px;
    }
    
    .register-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* RTL Specific Styles */
.wp-calendar-register-container * {
    direction: rtl;
}

.subcourse-header {
    flex-direction: row-reverse;
}

.subcourse-actions {
    flex-direction: row-reverse;
}

.price-info {
    text-align: right;
}

/* Animation for content appearance */
.calendar-content {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state for buttons */
.register-btn.loading {
    position: relative;
    color: transparent;
}

.register-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 