/* Order Tracking Page Styles */

.tracking-container {
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tracking-header {
    padding: 0;
}

.tracking-header button {
    border-radius: 0;
    font-weight: 600;
    padding: 1.5rem;
}

.tracking-header button i {
    margin-right: 0.5rem;
}

.tracking-body {
    padding: 2rem;
}

.tracking-description {
    color: #6c757d;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    color: #343a40;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.form-label i {
    margin-right: 0.5rem;
    color: #6c757d;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    border-color: #343a40;
    box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.25);
    outline: none;
}

.form-control::placeholder {
    color: #adb5bd;
}

.form-actions {
    text-align: center;
    margin: 2rem 0;
}

.btn-dark {
    background-color: #343a40;
    border-color: #343a40;
    color: white;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
}

.btn-dark:hover {
    background-color: #23272b;
    border-color: #23272b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 58, 64, 0.3);
}

.btn-outline-dark {
    color: #343a40;
    border-color: #343a40;
    background-color: transparent;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-outline-dark:hover {
    background-color: #343a40;
    border-color: #343a40;
    color: white;
}

.help-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.help-title {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.5rem;
}

.help-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert {
    border-radius: 8px;
    border: none;
    margin-bottom: 1.5rem;
}

.rate-limit-info .alert {
    border-left: 4px solid;
}

.rate-limit-info .alert-danger {
    border-left-color: #dc3545;
    background-color: #f8d7da;
    color: #721c24;
}

.rate-limit-info .alert-warning {
    border-left-color: #ffc107;
    background-color: #fff3cd;
    color: #856404;
}

.rate-limit-info .alert i {
    margin-right: 0.5rem;
}

.form-control:disabled {
    background-color: #e9ecef;
    opacity: 0.6;
    cursor: not-allowed;
}

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Enhanced Mobile Optimizations */
@media (max-width: 768px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
        padding-top: 1rem;
        padding-bottom: 2rem;
    }
    
    .tracking-container {
        margin: 0;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
    
    .tracking-header {
        padding: 0;
    }
    
    .tracking-header button {
        padding: 1.25rem 1rem;
        font-size: 1.1rem;
        border-radius: 12px 12px 0 0;
        font-weight: 700;
    }
    
    .tracking-body {
        padding: 2rem 1.25rem;
    }
    
    .tracking-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
        line-height: 1.6;
        padding: 0 0.5rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-label {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        font-weight: 600;
    }
    
    .form-control {
        padding: 1rem 1.25rem;
        font-size: 1.05rem;
        border-radius: 8px;
        min-height: 52px; /* Enhanced touch target */
        border-width: 2px;
        transition: all 0.2s ease;
    }
    
    .form-control:focus {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(52, 58, 64, 0.15);
    }
    
    .form-actions {
        margin: 2rem 0;
    }
    
    .btn-dark {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        min-height: 52px; /* Enhanced touch target */
        border-radius: 8px;
        font-weight: 600;
        width: 100%;
        transition: all 0.2s ease;
    }
    
    .btn-dark:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(52, 58, 64, 0.25);
    }
    
    .help-section {
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 2px solid #e9ecef;
    }
    
    .help-title {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 0.75rem;
    }
    
    .help-text {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1.25rem;
    }
    
    .btn-outline-dark {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-height: 48px; /* Better touch target */
        border-radius: 8px;
        font-weight: 600;
    }
    
    .alert {
        font-size: 0.9rem;
        padding: 1rem 1.25rem;
        margin-bottom: 1.5rem;
        border-radius: 8px;
        border-width: 2px;
    }
    
    .rate-limit-info .alert {
        font-size: 0.9rem;
        padding: 1rem;
    }
    
    .invalid-feedback {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
    
    .form-text {
        font-size: 0.8rem;
        margin-top: 0.5rem;
        color: #6c757d;
    }
    
    .input-group-text {
        background-color: #f8f9fa;
        border-color: #e9ecef;
        color: #6c757d;
    }
    
    .order-number-hint {
        cursor: help;
        transition: all 0.2s ease;
    }
    
    .order-number-hint:hover {
        background-color: #e9ecef;
        color: #495057;
    }
    
    .order-number-hint i {
        font-size: 0.9rem;
    }
    
    /* Enhanced visual feedback */
    .form-control.is-valid {
        border-color: #28a745;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.89 1.89L7.7 5.3l.94.94L4.17 10.5z'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right calc(0.375em + 0.1875rem) center;
        background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    }
    
    .form-control.is-invalid {
        border-color: #dc3545;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.5 5.5 1 1m0-1-1 1'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right calc(0.375em + 0.1875rem) center;
        background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .tracking-body {
        padding: 1rem 0.75rem;
    }
    
    .tracking-description {
        font-size: 0.85rem;
    }
    
    .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 0.95rem;
    }
    
    .btn-dark {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .help-text {
        font-size: 0.8rem;
    }
}

/* Desktop Enhancements */
@media (min-width: 769px) {
    .tracking-container {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .tracking-body {
        padding: 2.5rem;
    }
    
    .tracking-description {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }
    
    .form-group {
        margin-bottom: 2rem;
    }
    
    .form-label {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .form-control {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .form-control:focus {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(52, 58, 64, 0.15);
    }
    
    .btn-dark {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .btn-dark:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(52, 58, 64, 0.3);
    }
    
    .help-section {
        margin-top: 2.5rem;
        padding-top: 2.5rem;
    }
    
    .help-title {
        font-size: 1.2rem;
    }
    
    .help-text {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .btn-outline-dark {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    /* Enhanced visual feedback for desktop */
    .form-control.is-valid {
        border-color: #28a745;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.89 1.89L7.7 5.3l.94.94L4.17 10.5z'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right calc(0.375em + 0.1875rem) center;
        background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    }
    
    .form-control.is-invalid {
        border-color: #dc3545;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.5 5.5 1 1m0-1-1 1'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right calc(0.375em + 0.1875rem) center;
        background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    }
    
    .input-group-text {
        background-color: #f8f9fa;
        border-color: #e9ecef;
        color: #6c757d;
        transition: all 0.3s ease;
    }
    
    .input-group:focus-within .input-group-text {
        background-color: #e9ecef;
        border-color: #343a40;
    }
    
    .order-number-hint {
        cursor: help;
        transition: all 0.3s ease;
    }
    
    .order-number-hint:hover {
        background-color: #e9ecef;
        color: #495057;
        transform: scale(1.05);
    }
    
    .order-number-hint i {
        font-size: 1rem;
    }
}

/* Order info compact styling */
.order-info-compact {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.order-info-compact .d-flex {
    margin-bottom: 0.5rem;
}

.order-info-compact .d-flex:last-child {
    margin-bottom: 0;
}

/* Alert small variant */
.alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Loading state animations */
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Enhanced focus states */
.form-control:focus {
    outline: none;
    border-color: #343a40;
    box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.25);
}

.btn:focus, .btn:focus-visible, .btn:active {
    outline: none;
    box-shadow: none;
}

/* Smooth transitions for all interactive elements */
.form-control,
.btn,
.input-group-text {
    transition: all 0.2s ease;
}

/* Help Modal Styling */
.order-format-example {
    text-align: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.order-format-example code {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
    background-color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.format-breakdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.help-content ul li {
    display: flex;
    align-items: flex-start;
    padding: 0.5rem 0;
}

.help-content ul li i {
    margin-top: 0.125rem;
    flex-shrink: 0;
}

/* Modal enhancements */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    color: #495057;
    font-weight: 600;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
}
