/**
 * Shipping Tracking Public Styles
 */

.shipping-tracking-search {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.shipping-tracking-search-form {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.shipping-tracking-search-form h2 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.75rem;
    font-weight: 600;
}

.shipping-tracking-search-form > p {
    color: #666;
    margin: 0 0 2rem 0;
    font-size: 0.95rem;
}

.tracking-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.tracking-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.tracking-input:focus {
    outline: none;
    border-color: #0073aa;
}

.tracking-submit {
    padding: 0.875rem 2rem;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.tracking-submit:hover {
    background: #005a87;
}

.tracking-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.recaptcha-container {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

/* Hide reCAPTCHA if not enabled */
.recaptcha-container:empty {
    display: none;
}

.tracking-loader {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tracking-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    color: #856404;
    margin-top: 1rem;
}

.shipping-tracking-results {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tracking-info {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.tracking-info h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.tracking-details {
    display: grid;
    gap: 1rem;
}

.detail-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.detail-label {
    font-weight: 600;
    color: #666;
    min-width: 120px;
}

.detail-value {
    color: #333;
    flex: 1;
}

.tracking-status h3 {
    margin: 0 0 2rem 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.status-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 2rem 0;
    padding: 0 1rem;
}

.status-steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.status-step {
    flex: 1;
    position: relative;
    z-index: 1;
    text-align: center;
}

.step-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #fff;
    border: 3px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
}

.status-step.completed .step-icon-wrapper {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

.status-step.pending .step-icon-wrapper {
    background: #f8f9fa;
    border-color: #e0e0e0;
    color: #999;
}

.status-step.error .step-icon-wrapper {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.status-step.active .step-icon-wrapper {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 115, 170, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 115, 170, 0);
    }
}

.step-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.status-step.pending .step-title {
    color: #999;
}

.step-date {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.status-step.pending .step-date {
    color: #ccc;
}

.step-error {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #856404;
}

.error-message {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

.error-message strong {
    display: block;
    margin-bottom: 0.5rem;
}

.error-update {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    color: #155724;
}

.error-update strong {
    display: inline;
    margin-right: 0.5rem;
    font-weight: 600;
}

/* Connector lines between steps */
.status-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 30px;
    left: 57%;
    width: 86%;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.status-step.completed:not(:last-child)::after,
.status-step.active:not(:last-child)::after {
    background: #28a745;
}

.status-step.error:not(:last-child)::after {
    background: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .shipping-tracking-search {
        padding: 1rem;
    }
    
    .shipping-tracking-search-form {
        padding: 1.5rem;
    }
    
    .tracking-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .status-steps {
        flex-direction: column;
        gap: 2rem;
        padding: 0;
    }
    
    .status-steps::before {
        display: none;
    }
    
    .status-step:not(:last-child)::after {
        display: none;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .detail-label {
        min-width: auto;
    }
}

/* Font Awesome icon support */
.step-icon-wrapper i {
    font-size: inherit;
}

