/* Tracker Header */
.tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

/* Back to Landing Page Button */
.back-to-landing {
    margin-left: auto;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.back-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: white;
}

.back-btn i {
    font-size: 12px;
}

/* Page Title */
.page-title {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.page-title h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title h1 i {
    color: #1a73e8;
    font-size: 24px;
}

.page-title p {
    margin: 0;
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

/* Responsive Design for Tracker Header */
@media (max-width: 768px) {
    .tracker-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .page-title {
        text-align: center;
    }
    
    .page-title h1 {
        font-size: 24px;
        justify-content: center;
    }
    
    .page-title p {
        font-size: 14px;
    }
    
    .back-to-landing {
        margin-left: 0;
        order: -1;
    }
    
    .back-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Original Job Search Styles */
.job-search-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.search-section {
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    gap: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.search-input-wrapper {
    display: flex;
    flex: 1;
    gap: 10px;
}

.search-input-group {
    display: flex;
    align-items: center;
    flex: 1;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 8px 12px;
}

.input-icon {
    color: #666;
    margin-right: 8px;
}

.search-input-group input {
    border: none;
    background: none;
    width: 100%;
    padding: 4px;
    font-size: 14px;
    outline: none;
}

.search-button {
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: #1557b0;
}

.search-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.search-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 0 10px;
}

#jobMatchCount {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.job-results-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.job-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.job-title {
    font-size: 18px;
    color: #1a73e8;
    margin: 0 0 10px 0;
}

.company-name {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.job-location {
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.remote-badge {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.job-details {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.job-details span {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.job-description {
    color: #444;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.job-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, transparent, white);
}

.job-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.apply-btn,
.save-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

/* Apply button styles */
.apply-btn {
    background-color: #1a73e8;
    color: white !important; /* Ensure link color stays white */
    flex: 1;
    justify-content: center;
    min-height: 40px;
    outline: none;
}

.apply-btn:hover {
    background-color: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: white;
}

.apply-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #1a73e8;
    text-decoration: none;
}

.apply-btn:active,
.apply-btn.clicked {
    transform: translateY(1px);
    background-color: #174ea6;
    box-shadow: none;
    text-decoration: none;
}

/* Save button styles */
.save-btn {
    background-color: #f8f9fa;
    color: #1a73e8;
    border: 1px solid #1a73e8;
    padding: 7px 16px;
    min-height: 40px;
}

.save-btn:hover:not(:disabled) {
    background-color: #e8f0fe;
    box-shadow: 0 2px 4px rgba(26, 115, 232, 0.1);
}

.save-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #1a73e8;
}

.save-btn:active:not(:disabled) {
    background-color: #e8f0fe;
    transform: translateY(1px);
    box-shadow: none;
}

.save-btn:disabled {
    background-color: #f8f9fa;
    border-color: #dadce0;
    color: #80868b;
    cursor: not-allowed;
}

.save-btn.saved {
    background-color: #188038;
    border-color: #188038;
    color: white;
    cursor: not-allowed;
}

.save-btn.saved:hover {
    background-color: #188038;
    border-color: #188038;
    transform: none;
    box-shadow: none;
}

.save-btn i {
    font-size: 16px;
}

.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.location-suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.location-suggestion-item:hover {
    background: #f5f5f5;
}

.suggestion-type {
    font-size: 12px;
    color: #666;
    margin-left: auto;
}

.loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading i {
    font-size: 24px;
    color: #1a73e8;
    margin-bottom: 15px;
}

.loading p {
    color: #333;
    margin: 10px 0;
}

.loading-subtext {
    color: #666;
    font-size: 14px;
}

.no-jobs-found, .error-state {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.no-jobs-emoji, .error-emoji {
    font-size: 48px;
    margin-bottom: 20px;
}

.no-jobs-found h2, .error-state h2 {
    color: #333;
    margin-bottom: 10px;
}

.no-jobs-found p, .error-state p {
    color: #666;
    margin-bottom: 20px;
}

.error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.retry-btn, .clear-filters-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.retry-btn {
    background: #1a73e8;
    color: white;
    border: none;
}

.retry-btn:hover {
    background: #1557b0;
}

.clear-filters-btn {
    background: white;
    color: #666;
    border: 1px solid #ddd;
}

.clear-filters-btn:hover {
    background: #f5f5f5;
}

/* Responsive styles */
@media (max-width: 768px) {
    .search-input-wrapper {
        flex-direction: column;
    }

    .job-details {
        flex-direction: column;
        gap: 8px;
    }

    .job-actions {
        flex-direction: column;
        gap: 8px;
    }

    .apply-btn,
    .save-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px; /* Larger touch target for mobile */
    }
}

.enhanced-data {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.enhanced-data h4 {
    color: #1a73e8;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.enhanced-data h4::before {
    content: '🤖';
    font-size: 16px;
}

.enhanced-content {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
}

.enhanced-content p {
    margin: 5px 0;
}

.enhanced-content p:empty {
    display: none;
}

.load-more-btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 20px auto;
    padding: 12px 24px;
    background: #fff;
    border: 1px solid #1a73e8;
    border-radius: 6px;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.load-more-btn:hover {
    background: #e8f0fe;
}

.load-more-btn:disabled {
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
    cursor: not-allowed;
}

.load-more-btn i {
    font-size: 16px;
}

/* Error toast styles */
.application-error-toast {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #d93025;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 100;
    animation: slideIn 0.3s ease;
    pointer-events: none;
}

/* Success toast styles */
.application-success-toast {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #188038;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 100;
    animation: slideIn 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

/* Save success toast styles */
.save-success-toast {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #188038;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 100;
    animation: slideIn 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

/* Save error toast styles */
.save-error-toast {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #d93025;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 100;
    animation: slideIn 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.application-error-toast i,
.application-success-toast i {
    font-size: 16px;
}

/* Keyboard focus styles */
.job-card .apply-btn:focus-visible,
.job-card .save-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #1a73e8;
}

/* Animation for error toast */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Ellipsis button styles */
.ellipsis-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #666;
    transition: color 0.2s;
    font-size: 16px;
}

.ellipsis-button:hover {
    color: #333;
}

/* Toast Message Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid;
}

.toast.success {
    border-left-color: #10b981;
    color: #065f46;
}

.toast.error {
    border-left-color: #ef4444;
    color: #991b1b;
}

.toast.info {
    border-left-color: #3b82f6;
    color: #1e40af;
}

.toast.warning {
    border-left-color: #f59e0b;
    color: #92400e;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    opacity: 0.9;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    padding: 4px;
    border-radius: 4px;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}
