@import 'style.css';
@import 'header.css';
@import 'footer.css';

.footer {
    margin-top: 0rem;
}

.footer-top {
    margin-top: 2rem;
}

/**
 * Order Lookup CSS
 * Styling cho tính năng tra cứu đơn hàng
 */

/* Base Styles */
.order-lookup-section {
    padding: 20px 0;
    min-height: 80vh;
}

.lookup-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
}

.lookup-subtitle {
    font-size: 1rem;
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}

/* Form Container */
.lookup-form-container {
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 30px;
}

.lookup-form-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.lookup-form-card .card-header {
    background: linear-gradient(135deg, #1b74e4 0%, #155cbf 100%);
    color: white;
    padding: 20px 25px;
    border: none;
}

.lookup-form-card .card-header h4 {
    margin: 0;
    font-weight: 600;
}

.lookup-form-card .card-body {
    padding: 30px;
}

/* Form Elements */
.form-label.required::after {
    content: " *";
    color: #dc3545;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #1b74e4;
    box-shadow: 0 0 0 0.2rem rgba(27, 116, 228, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    font-size: 13px;
    color: #dc3545;
    margin-top: 5px;
}

.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.btn-lookup {
    background: linear-gradient(135deg, #1b74e4 0%, #155cbf 100%);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 25px;
    min-width: 180px;
    transition: all 0.3s ease;
}

.btn-lookup:hover {
    background: linear-gradient(135deg, #155cbf 0%, #1347a0 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(27, 116, 228, 0.4);
}

.btn-lookup:disabled {
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.btn-lookup .btn-loading {
    color: white;
}

/* Search Result */
.search-result {
    max-width: 1000px;
    margin: 40px auto 0;
}

.result-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-left: 5px solid #28a745;
}

.result-card .card-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px 25px;
    border: none;
}

.result-card .card-header h4 {
    margin: 0;
    font-weight: 600;
}

.result-card .card-body {
    padding: 30px;
}

/* Order Summary Card */
.order-summary-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.order-code {
    color: #1b74e4;
    font-weight: 600;
    margin-bottom: 15px;
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.order-total {
    text-align: right;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.total-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
}

.total-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1b74e4;
}

/* Products Summary */
.products-summary {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.products-summary h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-type {
    font-size: 10px;
    padding: 2px 6px;
}

.product-price {
    font-weight: 600;
    color: #1b74e4;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Badges */
.badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-warning {
    background: #ffc107;
    color: #212529;
}

.badge-info {
    background: #17a2b8;
    color: white;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}

/* Status specific badges */
.badge-status-pending {
    background: #ffc107;
    color: #212529;
}

.badge-status-processing {
    background: #17a2b8;
    color: white;
}

.badge-status-completed {
    background: #28a745;
    color: white;
}

.badge-status-cancelled {
    background: #dc3545;
    color: white;
}

.badge-payment-pending {
    background: #ffc107;
    color: #212529;
}

.badge-payment-paid {
    background: #28a745;
    color: white;
}

.badge-payment-failed {
    background: #dc3545;
    color: white;
}

/* Help Section */
.help-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.help-card {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: all 0.3s ease;
}

.help-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.help-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #1b74e4 0%, #155cbf 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.help-card h5 {
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.help-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Order Detail Section */
.order-detail-section {
    padding: 20px 0;
}

.order-header {
    background: #1b74e4;
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.order-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.order-meta {
    display: flex;
    gap: 10px;
}

.order-meta span {
    font-size: 14px;
    display: inline-block;
    color: #fff;
}

.order-header .total-amount {
    text-align: right;
}

.order-header .amount-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
    color: #fff;
}

.order-header .amount-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

/* Info Cards */
.info-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    overflow: hidden;
}

.info-card .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 25px;
}

.info-card .card-header h5 {
    margin: 0;
    color: #333;
    font-weight: 600;
    display: flex;
    gap: 10px;
}

.info-card .card-body {
    padding: 25px;
}

.info-item {
    margin-bottom: 15px;
}

.info-item label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.info-item span {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

/* Products Table */
.products-table .table {
    margin: 0;
}

.products-table .table th {
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    font-size: 13px;
    border-top: none;
    padding: 15px 12px;
}

.products-table .table td {
    padding: 15px 12px;
    vertical-align: middle;
    border-color: #e9ecef;
}

.empty-products {
    text-align: center;
    padding: 40px 20px;
}

/* Payment & Summary */
.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f8f9fa;
}

.payment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.payment-item label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.summary-table .table td {
    padding: 12px 0;
    border: none;
    font-size: 14px;
}

.summary-table .total-row td {
    border-top: 2px solid #e9ecef;
    padding-top: 15px;
    font-size: 16px;
}

.discount-row td {
    color: #28a745;
}

/* Order Actions */
.order-actions {
    margin-top: 20px;
}

.order-actions .btn {
    border-radius: 25px;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.order-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Alert Notifications */
.alert-notification {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.alert-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lookup-title {
        font-size: 1.8rem;
    }

    .lookup-form-card .card-body {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-lookup {
        width: 100%;
        max-width: 300px;
    }

    .order-header {
        padding: 20px;
    }

    .order-header .col-md-4 {
        text-align: center !important;
        margin-top: 20px;
    }

    .order-title {
        font-size: 1.4rem;
    }

    .order-meta {
        display: inline-grid;
        align-items: center;
    }

    .order-meta span {
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .info-card .card-body {
        padding: 20px;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .order-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .products-table {
        overflow-x: auto;
    }

    .products-table .table {
        min-width: 600px;
    }

    .payment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 576px) {
    .order-lookup-section {
        padding: 15px 0;
    }

    .lookup-form-container {
        margin: 0 15px;
        margin-bottom: 20px;
    }

    .search-result {
        margin: 30px 15px 0;
    }

    .help-section {
        margin: 0 15px;
        margin-top: 40px;
    }

    .help-card {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
}

/* =================================
   NEW DESIGN - Order Lookup Table
   ================================= */

/* Header */
.order-lookup-header {
    margin-bottom: 30px;
}

.order-lookup-header .lookup-title {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding: 0;
    text-align: left;
}

/* Search Form */
.search-form-section {
    margin-bottom: 30px;
}

.lookup-search-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input-group {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.btn-search {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 120px;
}

.btn-search:hover {
    background: #0056b3;
}

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

/* Results Table */
.search-results-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.results-table-container {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.results-table thead th {
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.results-table thead th i {
    margin-right: 5px;
    color: #6c757d;
}

.results-table tbody td {
    padding: 15px 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.results-table tbody tr:hover {
    background: #f8f9fa;
}

/* Table Cell Styling */
.order-code {
    font-weight: 600;
    color: #007bff;
}

.order-date {
    color: #666;
}

.order-status .badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status .badge.status-pending {
    background: #ffc107;
    color: #000;
}

.order-status .badge.status-processing {
    background: #17a2b8;
    color: #fff;
}

.order-status .badge.status-completed {
    background: #28a745;
    color: #fff;
}

.order-status .badge.status-cancelled {
    background: #dc3545;
    color: #fff;
}

.order-email {
    color: #666;
    font-family: monospace;
}

.order-total {
    font-weight: 600;
    color: #28a745;
}

.order-products {
    color: #666;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-detail {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-detail:hover {
    background: #138496;
    color: white;
    text-decoration: none;
}

/* No Results */
.no-results-section {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.no-results-content i {
    color: #6c757d;
    margin-bottom: 20px;
}

.no-results-content h4 {
    color: #333;
    margin-bottom: 10px;
}

.no-results-content p {
    color: #666;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-inputs {
        flex-direction: column;
        display: grid;
    }

    .btn-search {
        width: 100%;
    }

    .results-table-container {
        font-size: 14px;
    }

    .results-table thead th,
    .results-table tbody td {
        padding: 10px 8px;
    }

    .order-products {
        max-width: 150px;
    }

    .order-detail-section {
        padding-top: 0;
    }
}

@media (max-width: 576px) {
    .lookup-search-form {
        padding: 15px;
    }

    .results-table-container {
        font-size: 12px;
    }

    .results-table thead th,
    .results-table tbody td {
        padding: 8px 6px;
    }

    .order-lookup-header .lookup-title {
        font-size: 1.5rem;
    }
}