/**
 * Application Tracker - Premium Vogue Styling
 * Elegant tracking interface with glass morphism
 */

/* Floating Tracker Widget */
#application-tracker-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide tracker widget on mobile */
@media (max-width: 768px) {
    #application-tracker-widget,
    .tracker-widget,
    .tracker-toggle,
    .tracker-panel {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Ensure widget is always visible */
#application-tracker-widget .tracker-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#application-tracker-widget.has-applications .tracker-toggle {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(201, 169, 97, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(201, 169, 97, 0.5);
    }
}

.tracker-toggle {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: linear-gradient(135deg, #C9A961 0%, #B8935A 100%);
    border: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(201, 169, 97, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.tracker-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(201, 169, 97, 0.4);
    background: linear-gradient(135deg, #B8935A 0%, #C9A961 100%);
}

.tracker-toggle svg {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
}

.tracker-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Tracker Panel */
.tracker-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    max-height: 600px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 10px 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#application-tracker-widget.open .tracker-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.tracker-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tracker-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #C9A961 0%, #B8935A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'SF Pro Display', -apple-system, sans-serif;
}

.tracker-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tracker-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1f2937;
}

/* Tracker Stats */
.tracker-stats {
    padding: 16px 20px;
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tracker-stats .stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tracker List */
.tracker-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
}

.tracker-list::-webkit-scrollbar {
    width: 6px;
}

.tracker-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 3px;
}

.tracker-list::-webkit-scrollbar-thumb {
    background: rgba(201, 169, 97, 0.2);
    border-radius: 3px;
}

.tracker-list::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 169, 97, 0.3);
}

/* Application Items */
.application-item {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.application-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.app-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.app-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.app-info p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.app-status {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-status.started {
    background: rgba(251, 191, 36, 0.1);
    color: #f59e0b;
}

.app-status.in_progress {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.app-status.submitted {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

/* Progress Bar */
.app-progress {
    margin-bottom: 12px;
}

.progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C9A961 0%, #B8935A 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 11px;
    color: #6b7280;
}

/* Material Badges */
.app-materials {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.material-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.03);
    color: #6b7280;
    transition: all 0.2s ease;
}

.material-badge.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

/* Action Buttons */
.app-actions {
    display: flex;
    gap: 8px;
}

.btn-continue {
    flex: 1;
    padding: 8px 12px;
    background: linear-gradient(135deg, #C9A961 0%, #B8935A 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-continue:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.25);
    background: linear-gradient(135deg, #B8935A 0%, #C9A961 100%);
}

.btn-remove {
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.empty-state p {
    margin: 0 0 8px 0;
    font-size: 15px;
}

.empty-state small {
    font-size: 13px;
    color: #9ca3af;
}

/* Notifications */
.tracker-notification {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 320px;
    font-size: 14px;
    color: #1f2937;
}

.tracker-notification.show {
    transform: translateX(0);
}

.tracker-notification.success {
    border-left: 4px solid #10b981;
}

.tracker-notification.info {
    border-left: 4px solid #3b82f6;
}

.tracker-notification.warning {
    border-left: 4px solid #f59e0b;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #application-tracker-widget {
        bottom: 16px;
        right: 16px;
    }
    
    .tracker-toggle {
        width: 56px;
        height: 56px;
    }
    
    .tracker-panel {
        width: calc(100vw - 32px);
        right: -8px;
        max-height: 70vh;
    }
    
    .tracker-notification {
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

/* Quick Apply Interface in Chat */
.quick-apply-interface {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 24px;
    margin: 16px 0;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.quick-apply-interface h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #92400e;
}

.quick-apply-interface .company-name {
    margin: 0 0 20px 0;
    color: #78350f;
    font-size: 14px;
}

.application-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}

.application-steps .step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.application-steps .step.active {
    opacity: 1;
}

.step-number {
    width: 28px;
    height: 28px;
    background: white;
    border: 2px solid #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #92400e;
    font-size: 14px;
}

.step.active .step-number {
    background: #f59e0b;
    color: white;
}

.step-label {
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
}

.application-content {
    text-align: center;
}

.application-content p {
    margin: 0 0 20px 0;
    color: #78350f;
}

.start-application {
    padding: 12px 24px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.start-application:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}