/* Reusable Component Styles */

/* Card Components */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-medium);
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.3);
}

.card-header {
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.card-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

/* Badge Components */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.badge-secondary {
    background: rgba(124, 58, 237, 0.2);
    color: var(--secondary-color);
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.badge-accent {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent-color);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Progress Bar Components */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--glass-bg);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

/* Icon Components */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    transition: var(--transition-medium);
}

.icon-primary {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
}

.icon-secondary {
    background: rgba(124, 58, 237, 0.2);
    color: var(--secondary-color);
}

.icon-accent {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent-color);
}

.icon:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Tooltip Components */
.tooltip {
    position: relative;
    cursor: pointer;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-small);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: 1000;
    border: 1px solid var(--glass-border);
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--bg-secondary);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

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

/* Modal Components */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-medium);
}

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

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    transition: var(--transition-medium);
    z-index: 10000;
}

.modal-overlay.active .modal {
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

/* Tab Components */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2rem;
}

.tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    font-weight: 500;
}

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

.tab.active {
    color: var(--primary-color);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* Accordion Components */
.accordion {
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--glass-border);
}

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

.accordion-header {
    padding: 1.5rem;
    background: var(--glass-bg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.accordion-header.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
}

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

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

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

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

.accordion-body {
    padding: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Alert Components */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-small);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-info {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Breadcrumb Components */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumb-item:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* Dropdown Components */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-small);
    box-shadow: var(--glass-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
    z-index: 1000;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

/* Pagination Components */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--border-radius-small);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.pagination-item:hover {
    background: var(--glass-border);
    color: var(--text-primary);
}

.pagination-item.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

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

/* Form Components */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

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

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

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Table Components */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.table th {
    background: var(--glass-bg);
    color: var(--text-primary);
    font-weight: 600;
}

.table td {
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Responsive Utilities */
.visible-mobile {
    display: none;
}

.hidden-mobile {
    display: block;
}

@media (max-width: 768px) {
    .visible-mobile {
        display: block;
    }
    
    .hidden-mobile {
        display: none;
    }
    
    .card {
        padding: 1rem;
    }
    
    .modal {
        padding: 1.5rem;
    }
    
    .tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .tab {
        flex-shrink: 0;
    }
}
