/* ============================================
   ЭКСПРЕСС-ДИАГНОСТИКА ПО 36 ТАТТВАМ
   Components
   ============================================ */

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--bg-primary);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--gold);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.card-accent {
    border-color: rgba(212, 175, 55, 0.3);
}

.card-accent:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
}

/* ============================================
   FORMS
   ============================================ */

.input-group {
    margin-bottom: var(--space-lg);
}

.input-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.input::placeholder {
    color: var(--text-dim);
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-gold {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold);
}

.badge-emerald {
    background: rgba(0, 168, 107, 0.2);
    color: var(--emerald);
}

.badge-amber {
    background: rgba(255, 140, 0, 0.2);
    color: var(--amber);
}

/* ============================================
   PROGRESS INDICATORS
   ============================================ */

.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: var(--bg-card);
    stroke-width: 8;
}

.progress-circle-fill {
    fill: none;
    stroke: var(--gold);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.progress-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
}

.progress-step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-card);
    transition: all var(--transition-fast);
}

.progress-step.completed {
    background: var(--emerald);
}

.progress-step.active {
    background: var(--gold);
    box-shadow: 0 0 8px var(--gold);
}

/* ============================================
   LOADING STATES
   ============================================ */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-card) 0%,
        var(--bg-card-hover) 50%,
        var(--bg-card) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-card);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   TABS
   ============================================ */

.tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-xl);
}

.tab {
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--text-secondary);
}

.tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* ============================================
   MODALS
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-sm);
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--gold);
}

.modal-body {
    padding: var(--space-xl);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    padding: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   TOOLTIPS
   ============================================ */

.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 100;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   ACCORDION
   ============================================ */

.accordion {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.accordion-header:hover {
    background: var(--bg-card-hover);
}

.accordion-icon {
    transition: transform var(--transition-fast);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-body {
    padding: var(--space-lg);
    color: var(--text-muted);
}

/* ============================================
   LIST GROUP
   ============================================ */

.list-group {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.list-group-item {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background var(--transition-fast);
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background: var(--bg-card);
}

.list-group-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    border-radius: var(--radius-sm);
    color: var(--gold);
    margin-right: var(--space-md);
}

.list-group-content {
    flex: 1;
}

.list-group-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.list-group-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   ALERT
   ============================================ */

.alert {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.alert-info {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold);
}

.alert-success {
    background: rgba(0, 168, 107, 0.1);
    border: 1px solid rgba(0, 168, 107, 0.3);
    color: var(--emerald);
}

.alert-warning {
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.3);
    color: var(--amber);
}

/* ============================================
   DIVIDER
   ============================================ */

.divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 175, 55, 0.3),
        transparent
    );
    margin: var(--space-2xl) 0;
}

/* ============================================
   AVATAR
   ============================================ */

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

/* ============================================
   TAG
   ============================================ */

.tag {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tag + .tag {
    margin-left: var(--space-xs);
}

/* ============================================
   RATING
   ============================================ */

.rating {
    display: flex;
    gap: var(--space-xs);
}

.rating-star {
    color: var(--text-dim);
    font-size: 1.2rem;
}

.rating-star.filled {
    color: var(--gold);
}

/* ============================================
   STATS
   ============================================ */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-lg);
}

.stat-item {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: var(--space-xs);
}

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