/**
 * MyCityBiz Learn — Components & Portal Styles
 */

/* Course Card */
.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}

.course-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #1e293b;
}

.course-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.course-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.35;
}

.course-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.course-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-cyan);
}

/* Form Styles */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

/* Portal Dashboard Shell */
.portal-layout {
    display: flex;
    min-height: calc(100vh - 70px);
}

.portal-sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid var(--border-subtle);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.portal-sidebar a:hover, .portal-sidebar a.active {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}

.portal-content {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
}

/* Course Player Shell */
.player-shell {
    display: flex;
    height: 100vh;
    background: #060911;
    overflow: hidden;
}

.player-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.player-sidebar {
    width: 360px;
    background: #090e1a;
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
}

.player-video-box {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    background: #000;
}

.player-video-box iframe, .player-video-box video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Floating AI Drawer */
.ai-companion-drawer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-height: 540px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
}

.ai-header {
    padding: 14px 18px;
    background: rgba(6, 182, 212, 0.1);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    max-height: 380px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-msg {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.45;
}

.ai-msg-assistant {
    background: #1e293b;
    border: 1px solid var(--border-subtle);
    color: #f1f5f9;
    align-self: flex-start;
}

.ai-msg-user {
    background: var(--accent-cyan);
    color: #000;
    font-weight: 500;
    align-self: flex-end;
}
