/* ===================================
   AnnovaSol - Components Stylesheet
   Additional Component Styles
   =================================== */

/* ===================================
   Card Components
   =================================== */
.card-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-3d:hover {
    transform: rotateY(10deg) rotateX(5deg);
}

.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.card-shine:hover::before {
    transform: translateX(100%);
}

/* ===================================
   Glass Morphism Effect
   =================================== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===================================
   Gradient Borders
   =================================== */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 1rem;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* ===================================
   Tooltip Component
   =================================== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    min-width: 120px;
    background-color: #111827;
    color: white;
    text-align: center;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    position: absolute;
    z-index: 1100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 0.875rem;
    white-space: nowrap;
}

.tooltip .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #111827 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ===================================
   Badge Component
   =================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.badge-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ===================================
   Progress Bar
   =================================== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: inherit;
    transition: width 0.3s ease;
}

/* ===================================
   Alert Component
   =================================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 1rem 0;
}

.alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

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

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

/* ===================================
   Divider
   =================================== */
.divider {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(102, 126, 234, 0.3),
        transparent
    );
    margin: 2rem 0;
}

.divider-vertical {
    width: 1px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(102, 126, 234, 0.3),
        transparent
    );
}

/* ===================================
   Accordion Component
   =================================== */
.accordion-item {
    background: white;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.accordion-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.accordion-header:hover {
    background-color: #f9fafb;
}

.accordion-icon {
    transition: transform 0.3s;
}

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

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

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

.accordion-body {
    padding: 0 1.5rem 1.5rem;
    color: #6b7280;
    line-height: 1.7;
}

/* ===================================
   Tab Component
   =================================== */
.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.tab-item {
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.tab-item:hover {
    color: #667eea;
}

.tab-item.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

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

/* ===================================
   Modal Component
   =================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.modal {
    background: white;
    border-radius: 1rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

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

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    font-size: 1.5rem;
    color: #6b7280;
}

.modal-close:hover {
    background-color: #f3f4f6;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

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

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.5rem 0;
}

/* ===================================
   Breadcrumb
   =================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.95rem;
}

.breadcrumb-item a {
    color: #667eea;
    transition: color 0.3s;
}

.breadcrumb-item a:hover {
    color: #5568d3;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    color: #d1d5db;
    margin-left: 0.5rem;
}

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

.pagination-item {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    background: white;
    border: 1px solid #e5e7eb;
}

.pagination-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.pagination-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

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

/* ===================================
   Avatar Component
   =================================== */
.avatar {
    position: relative;
    display: inline-block;
}

.avatar-image {
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 40px;
    height: 40px;
}

.avatar-md {
    width: 60px;
    height: 60px;
}

.avatar-lg {
    width: 80px;
    height: 80px;
}

.avatar-xl {
    width: 120px;
    height: 120px;
}

.avatar-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.avatar-status.online {
    background-color: #10b981;
}

.avatar-status.offline {
    background-color: #6b7280;
}

.avatar-status.busy {
    background-color: #ef4444;
}

.avatar-status.away {
    background-color: #f59e0b;
}

/* ===================================
   Timeline Component
   =================================== */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(
        to bottom,
        #667eea,
        #764ba2
    );
}

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

.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid #667eea;
    border-radius: 50%;
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-description {
    color: #6b7280;
    line-height: 1.7;
}

/* ===================================
   Skeleton Loaders
   =================================== */
.skeleton-box {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

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

.skeleton-title {
    height: 2rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    border-radius: 1rem;
}

/* ===================================
   Empty State
   =================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #667eea;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.empty-state-description {
    color: #6b7280;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
   Spinner Loaders
   =================================== */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

/* ===================================
   Responsive Utilities
   =================================== */
@media (max-width: 768px) {
    .modal {
        width: 95%;
        max-height: 95vh;
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-item {
        white-space: nowrap;
    }
}
