/* ============================================
   E-SAĞLIK - COMPONENT STYLES
   Additional UI Components
   ============================================ */

/* ============================================
   SPECIAL BUTTONS
   ============================================ */
.btn-gradient-primary {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    border: none;
    color: white;
}

.btn-gradient-primary:hover {
    background: linear-gradient(135deg, #0b5ed7, #0a58ca);
    color: white;
}

.btn-gradient-success {
    background: linear-gradient(135deg, #198754, #146c43);
    border: none;
    color: white;
}

.btn-gradient-success:hover {
    background: linear-gradient(135deg, #146c43, #0f5132);
    color: white;
}

/* ============================================
   CARD VARIANTS
   ============================================ */
.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-0.25rem);
}

.card-border-left-primary {
    border-left: 4px solid var(--primary-color);
}

.card-border-left-success {
    border-left: 4px solid #198754;
}

.card-border-left-warning {
    border-left: 4px solid #ffc107;
}

.card-border-left-danger {
    border-left: 4px solid #dc3545;
}

/* ============================================
   STATUS INDICATORS
   ============================================ */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background-color: #198754;
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.3);
}

.status-dot.offline {
    background-color: #6c757d;
}

.status-dot.busy {
    background-color: #dc3545;
    animation: pulse 1.5s infinite;
}

/* ============================================
   STEP INDICATORS
   ============================================ */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.step {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.step.active {
    background-color: var(--primary-color);
    color: white;
}

.step.completed {
    background-color: #198754;
    color: white;
}

.step.inactive {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
}

.step-line {
    width: 2rem;
    height: 2px;
    background-color: var(--bg-tertiary);
}

.step-line.completed {
    background-color: #198754;
}

/* ============================================
   SEARCH BOX
   ============================================ */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 3rem;
}

.search-box .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box .clear-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: none;
}

.search-box.has-value .clear-btn {
    display: block;
}

/* ============================================
   TAGS INPUT
   ============================================ */
.tag-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    min-height: 48px;
}

.tag-input-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.tag-badge .remove-tag {
    cursor: pointer;
    opacity: 0.7;
}

.tag-badge .remove-tag:hover {
    opacity: 1;
}

.tag-input {
    flex: 1;
    min-width: 120px;
    border: none;
    background: none;
    outline: none;
    color: var(--text-primary);
}

/* ============================================
   IMAGE PLACEHOLDER
   ============================================ */
.img-placeholder {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, 
        var(--bg-secondary) 25%, 
        var(--bg-tertiary) 50%, 
        var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.25rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 0.75rem;
}

.skeleton-img {
    height: 200px;
    width: 100%;
}

.skeleton-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ============================================
   CHAT BUBBLES
   ============================================ */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-bubble {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    position: relative;
}

.chat-bubble.sent {
    align-self: flex-end;
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.chat-bubble.received {
    align-self: flex-start;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-bottom-left-radius: 0.25rem;
}

.chat-bubble-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* ============================================
   PROGRESS STEP BAR
   ============================================ */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.progress-step::after {
    content: "";
    position: absolute;
    top: 1rem;
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: var(--bg-tertiary);
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.completed::after {
    background-color: #198754;
}

.progress-step.active::after {
    background: linear-gradient(90deg, #198754, var(--bg-tertiary));
}

.progress-step-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    z-index: 1;
}

.progress-step.completed .progress-step-circle {
    background-color: #198754;
    color: white;
}

.progress-step.active .progress-step-circle {
    background-color: var(--primary-color);
    color: white;
    animation: pulse 2s infinite;
}

.progress-step-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-align: center;
}

.progress-step.active .progress-step-label,
.progress-step.completed .progress-step-label {
    color: var(--text-primary);
    font-weight: 500;
}

/* ============================================
   CHART CONTAINER
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ============================================
   AVATAR
   ============================================ */
.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
}

.avatar-lg {
    width: 4rem;
    height: 4rem;
}

.avatar-xl {
    width: 6rem;
    height: 6rem;
}

.avatar-group {
    display: flex;
}

.avatar-group .avatar {
    margin-left: -0.75rem;
    border: 2px solid var(--card-bg);
}

.avatar-group .avatar:first-child {
    margin-left: 0;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid var(--bg-primary);
}

.timeline-item.completed::before {
    background-color: #198754;
}

.timeline-item.active::before {
    background-color: var(--primary-color);
    animation: pulse 2s infinite;
}

/* ============================================
   STAT CARD
   ============================================ */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

.stat-icon.success {
    background-color: var(--success-bg);
    color: #198754;
}

.stat-icon.warning {
    background-color: var(--warning-bg);
    color: #b38600;
}

.stat-icon.danger {
    background-color: var(--danger-bg);
    color: #dc3545;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================
   NOTIFICATION BADGE
   ============================================ */
.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: attr(data-count);
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    background-color: #dc3545;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-badge[data-count="0"]::after {
    display: none;
}

/* ============================================
   COPY TO CLIPBOARD
   ============================================ */
.copy-trigger {
    position: relative;
}

.copy-trigger .copy-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #198754;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.copy-trigger.copied .copy-feedback {
    opacity: 1;
}

/* ============================================
   RESPONSIVE HELPERS
   ============================================ */
@media (max-width: 767.98px) {
    .hide-on-mobile {
        display: none !important;
    }
    
    .text-center-mobile {
        text-align: center;
    }
    
    .stack-on-mobile {
        flex-direction: column;
    }
}

@media (min-width: 768px) {
    .hide-on-desktop {
        display: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}
