/**
 * DDS Public Tracking Frontend Styles
 */

/* ===== TRACKING FORM STYLES ===== */

#tracking-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

#tracking-input {
    flex: 1;
    padding: 1.2rem;
    border: 2px solid #E2E8F0;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

#tracking-input:focus {
    outline: none;
    border-color: #0B60A9;
    box-shadow: 0 0 0 3px rgba(11, 96, 169, 0.1);
}

#tracking-input::placeholder {
    color: #B0BAC3;
}

#tracking-button {
    padding: 1.2rem 2.5rem;
    background: linear-gradient(135deg, #0B60A9 0%, #1A7BC4 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(11, 96, 169, 0.2);
    white-space: nowrap;
    font-size: 1rem;
}

#tracking-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(11, 96, 169, 0.3);
}

#tracking-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

#tracking-button i {
    margin-right: 0.5rem;
}

/* ===== MESSAGE ALERTS ===== */

#tracking-error,
#tracking-success {
    padding: 1.2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    display: none;
    animation: slideDown 0.3s ease;
}

#tracking-error {
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid #F44336;
}

#tracking-success {
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid #4CAF50;
}

#tracking-error i,
#tracking-success i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LOADING SPINNER ===== */

.tracking-loading-spinner {
    text-align: center;
    padding: 2rem;
    display: none;
}

.tracking-loading-spinner i {
    font-size: 2rem;
    color: #0B60A9;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== RESULTS CONTAINER ===== */

#tracking-results {
    display: none;
    margin-top: 3rem;
}

/* ===== SHIPMENT DETAILS CARD ===== */

.tracking-details-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-left: 5px solid;
    margin-bottom: 2rem;
}

.tracking-details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #E2E8F0;
}

.tracking-details-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tracking-status-badge {
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    border: 2px solid;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ===== INFO GRID ===== */

.tracking-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.tracking-info-item {
    position: relative;
}

.tracking-info-item label {
    display: block;
    color: #7A8699;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.tracking-info-item p,
.tracking-info-item code {
    margin: 0;
    color: #1A2332;
    font-size: 1rem;
    line-height: 1.6;
}

.tracking-info-item code {
    display: inline-block;
    background: #F5F7FA;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* ===== COPY BUTTON ===== */

.copy-button {
    position: absolute;
    right: 0;
    top: 2.5rem;
    background: transparent;
    border: none;
    color: #0B60A9;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.copy-button:hover {
    color: #1A7BC4;
    transform: scale(1.1);
}

.copy-feedback {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* ===== DESCRIPTION SECTION ===== */

.tracking-description {
    background: #F5F7FA;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.tracking-description label {
    display: block;
    color: #7A8699;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.tracking-description p {
    margin: 0;
    color: #1A2332;
    line-height: 1.8;
}

/* ===== CONTACT INFO ===== */

.tracking-contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid #E2E8F0;
}

.contact-item label {
    display: block;
    color: #7A8699;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.contact-item p {
    margin: 0;
    color: #1A2332;
    line-height: 1.8;
}

.contact-item i {
    margin-right: 0.5rem;
    color: #0B60A9;
    width: 20px;
}

/* ===== TIMELINE STYLES ===== */

.tracking-timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 3rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.timeline-item.active {
    opacity: 1;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border: 3px solid white;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item.active .timeline-marker {
    transform: scale(1.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.timeline-item.active .timeline-content {
    background: linear-gradient(135deg, #F5F7FA 0%, #E8EDF5 100%);
    box-shadow: 0 8px 30px rgba(11, 96, 169, 0.15);
}

.timeline-date {
    font-size: 0.85rem;
    color: #7A8699;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.timeline-title {
    margin: 0 0 0.5rem 0;
    color: #1A2332;
    font-size: 1.1rem;
    font-weight: 700;
}

.timeline-location {
    margin: 0.5rem 0;
    color: #0B60A9;
    font-size: 0.9rem;
    font-weight: 600;
}

.timeline-location i {
    margin-right: 0.5rem;
}

.timeline-description {
    margin: 0.75rem 0 0 0;
    color: #4A5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== TIMELINE LINE ===== */

.timeline-line {
    position: absolute;
    left: 24px;
    width: 2px;
    height: 80px;
    margin-top: -30px;
    margin-bottom: -50px;
    z-index: 1;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    #tracking-form {
        flex-direction: column;
        gap: 1rem;
    }

    #tracking-button {
        width: 100%;
    }

    .tracking-details-header {
        flex-direction: column;
        gap: 1rem;
    }

    .tracking-status-badge {
        align-self: flex-start;
    }

    .tracking-info-grid {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .tracking-details-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tracking-details-card {
        border-radius: 1rem;
        padding: 1rem;
    }

    .tracking-details-header {
        padding-bottom: 1rem;
    }

    .tracking-info-item code {
        display: block;
        margin-bottom: 0.75rem;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-marker {
        width: 38px;
        height: 38px;
    }

    .copy-button {
        position: static;
        display: block;
        margin-top: 0.5rem;
    }
}

/* ===== ANIMATIONS ===== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tracking-details-card,
.timeline-item {
    animation: fadeInUp 0.4s ease;
}
