/* Dr. MTAI - AI Medical Instructor Styles */

/* Avatar Container */
.dr-mtai-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.dr-mtai-avatar:hover {
    transform: scale(1.05);
}

.dr-mtai-avatar.small {
    width: 50px;
    height: 50px;
}

.dr-mtai-avatar.large {
    width: 120px;
    height: 120px;
}

.dr-mtai-avatar.xlarge {
    width: 180px;
    height: 180px;
}

/* Quote/Teaching Box */
.dr-mtai-box {
    background: linear-gradient(135deg, #f8fbfe 0%, #e8f4fc 100%);
    border-left: 4px solid var(--light-blue);
    border-radius: 0 12px 12px 0;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dr-mtai-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 34, 55, 0.12);
}

.dr-mtai-box.highlight {
    background: linear-gradient(135deg, #0d2237 0%, #1a3a5c 100%);
    border-left-color: var(--orange);
    color: #fff;
}

.dr-mtai-box.highlight .dr-mtai-name {
    color: var(--orange);
}

.dr-mtai-box.highlight .dr-mtai-title {
    color: rgba(255, 255, 255, 0.8);
}

.dr-mtai-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dr-mtai-info {
    display: flex;
    flex-direction: column;
}

.dr-mtai-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-blue);
    margin: 0;
}

.dr-mtai-title {
    font-size: 0.85rem;
    color: var(--light-blue);
    margin: 0;
}

.dr-mtai-content {
    font-size: 1rem;
    line-height: 1.7;
}

.dr-mtai-content p:last-child {
    margin-bottom: 0;
}

/* Tip Box */
.dr-mtai-tip {
    background: #fff8f0;
    border: 1px solid rgba(255, 143, 43, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.dr-mtai-tip .dr-mtai-avatar {
    width: 40px;
    height: 40px;
}

.dr-mtai-tip-content {
    flex: 1;
}

.dr-mtai-tip-label {
    font-weight: 600;
    color: var(--orange);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.dr-mtai-tip-text {
    margin: 0;
    color: var(--dark-blue);
}

/* Warning Box */
.dr-mtai-warning {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-left: 4px solid #dc3545;
    border-radius: 0 12px 12px 0;
    padding: 1.25rem;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.dr-mtai-warning .dr-mtai-avatar {
    width: 40px;
    height: 40px;
}

.dr-mtai-warning-label {
    font-weight: 600;
    color: #dc3545;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

/* Introduction Card */
.dr-mtai-intro {
    background: linear-gradient(135deg, var(--dark-blue) 0%, #1a3a5c 100%);
    border-radius: 20px;
    padding: 2.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    box-shadow: 0 10px 40px rgba(13, 34, 55, 0.3);
    position: relative;
    overflow: hidden;
}

/* Animated gradient background */
.dr-mtai-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        transparent 0%,
        rgba(255, 143, 43, 0.05) 25%,
        transparent 50%,
        rgba(46, 118, 174, 0.08) 75%,
        transparent 100%);
    background-size: 400% 400%;
    animation: dr-mtai-gradient 15s ease infinite;
    pointer-events: none;
}

@keyframes dr-mtai-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.dr-mtai-intro .dr-mtai-avatar {
    width: 150px;
    height: 150px;
}

.dr-mtai-intro-content {
    flex: 1;
}

.dr-mtai-intro-greeting {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.dr-mtai-intro-greeting span {
    color: var(--orange);
}

.dr-mtai-intro-text {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.95;
    margin-bottom: 0;
}

/* Teaching Card */
.dr-mtai-teaching-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 1.5rem 0;
}

.dr-mtai-teaching-header {
    background: var(--dark-blue);
    color: #fff;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dr-mtai-teaching-header .dr-mtai-avatar {
    width: 45px;
    height: 45px;
}

.dr-mtai-teaching-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.dr-mtai-teaching-body {
    padding: 1.5rem;
}

/* Inline Quote */
.dr-mtai-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--transparent-blue);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-style: italic;
    color: var(--dark-blue);
}

.dr-mtai-inline .dr-mtai-avatar {
    width: 30px;
    height: 30px;
}

/* Floating Assistant */
.dr-mtai-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.dr-mtai-floating:hover {
    transform: scale(1.1);
}

.dr-mtai-floating .dr-mtai-avatar {
    width: 70px;
    height: 70px;
    filter: drop-shadow(0 4px 15px rgba(13, 34, 55, 0.4));
}

/* Pulse Animation for Avatar */
@keyframes dr-mtai-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(46, 118, 174, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(46, 118, 174, 0);
    }
}

.dr-mtai-avatar.pulse {
    animation: dr-mtai-pulse 2s infinite;
    border-radius: 50%;
}

/* Glow effect for avatar */
@keyframes dr-mtai-glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(46, 118, 174, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(46, 118, 174, 0.6));
    }
}

.dr-mtai-avatar.glow {
    animation: dr-mtai-glow 3s ease-in-out infinite;
}

/* Online Status Indicator */
.dr-mtai-status {
    position: relative;
    display: inline-block;
}

.dr-mtai-status::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 14px;
    height: 14px;
    background: #28a745;
    border: 2px solid #fff;
    border-radius: 50%;
    animation: dr-mtai-status-pulse 2s ease-in-out infinite;
}

@keyframes dr-mtai-status-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Typing indicator animation */
.dr-mtai-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--transparent-blue);
    border-radius: 20px;
}

.dr-mtai-typing span {
    width: 8px;
    height: 8px;
    background: var(--light-blue);
    border-radius: 50%;
    animation: dr-mtai-bounce 1.4s ease-in-out infinite;
}

.dr-mtai-typing span:nth-child(1) { animation-delay: 0s; }
.dr-mtai-typing span:nth-child(2) { animation-delay: 0.2s; }
.dr-mtai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dr-mtai-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* Welcome Section */
.dr-mtai-welcome-section {
    background: linear-gradient(180deg, var(--transparent-blue) 0%, #fff 100%);
    padding: 4rem 0;
}

.dr-mtai-welcome-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.dr-mtai-welcome-avatar {
    margin-bottom: 1.5rem;
}

.dr-mtai-welcome-message {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--dark-blue);
}

/* Responsive */
@media (max-width: 768px) {
    .dr-mtai-intro {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .dr-mtai-intro .dr-mtai-avatar {
        width: 120px;
        height: 120px;
    }

    .dr-mtai-intro-greeting {
        font-size: 1.3rem;
    }

    .dr-mtai-intro-text {
        font-size: 1rem;
    }

    .dr-mtai-header {
        flex-direction: column;
        text-align: center;
    }

    .dr-mtai-box {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .dr-mtai-tip,
    .dr-mtai-warning {
        flex-direction: column;
        text-align: center;
    }
}
