/* assets/css/frontend.css */

.dot-tracking-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
}

/* Search Section */
.dot-search-section {
    background: linear-gradient(135deg, #33E85D 0%, #28c74d 100%);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(51, 232, 93, 0.3);
}

.dot-search-section h2 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dot-search-section p {
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 25px 0;
    font-size: 15px;
}

/* Search Form */
.dot-search-form {
    display: flex;
    gap: 12px;
    max-width: 450px;
    margin: 0 auto;
}

.dot-input-wrapper {
    flex: 1;
    position: relative;
}

.dot-input-wrapper input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    direction: ltr;
    text-align: left;
}

.dot-input-wrapper input:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(51, 232, 93, 0.25);
    transform: translateY(-2px);
}

.dot-input-wrapper::before {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.dot-search-btn {
    padding: 16px 32px;
    background: #fff;
    color: #28a745;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.dot-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
}

.dot-search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.dot-search-btn .dot-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #33E85D;
    border-top-color: transparent;
    border-radius: 50%;
    animation: dot-spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes dot-spin {
    to { transform: rotate(360deg); }
}

/* Results Section */
.dot-results-section {
    display: none;
}

.dot-results-section.active {
    display: block;
    animation: dot-fadeIn 0.4s ease;
}

@keyframes dot-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.dot-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.dot-results-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.dot-results-count {
    background: linear-gradient(135deg, #33E85D 0%, #28c74d 100%);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(51, 232, 93, 0.3);
}

/* Orders List */
.dot-orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dot-order-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.dot-order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(51, 232, 93, 0.2);
    border-color: #33E85D;
}

.dot-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.dot-order-number {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.dot-order-date {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.dot-order-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.dot-order-status.status-pending,
.dot-order-status.status-on-hold {
    background: #fff3cd;
    color: #856404;
}

.dot-order-status.status-pws-post {
    background: #d4edda;
    color: #155724;
}

.dot-order-status.status-processing {
    background: #cce5ff;
    color: #004085;
}

.dot-order-status.status-completed {
    background: #d4edda;
    color: #155724;
}

.dot-order-status.status-cancelled,
.dot-order-status.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.dot-order-status.status-refunded {
    background: #e2e3e5;
    color: #383d41;
}

.dot-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.dot-order-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dot-order-items {
    font-size: 14px;
    color: #666;
}

.dot-order-tracking-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(51, 232, 93, 0.15) 0%, rgba(40, 199, 77, 0.15) 100%);
    color: #1e8e3e;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(51, 232, 93, 0.3);
}

.dot-order-total {
    font-size: 18px;
    font-weight: 700;
    color: #33E85D;
}

.dot-view-details {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #33E85D;
    font-size: 14px;
    font-weight: 600;
}

/* Modal */
.dot-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.dot-modal-overlay.active {
    display: flex;
    animation: dot-fadeIn 0.3s ease;
}

.dot-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: dot-slideUp 0.4s ease;
}

@keyframes dot-slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.dot-modal-header {
    background: linear-gradient(135deg, #33E85D 0%, #28c74d 100%);
    color: #fff;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dot-modal-header h3 {
    margin: 0;
    font-size: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dot-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.dot-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.dot-modal-body {
    padding: 25px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

/* Order Details */
.dot-detail-section {
    margin-bottom: 25px;
}

.dot-detail-section:last-child {
    margin-bottom: 0;
}

.dot-detail-section h4 {
    font-size: 16px;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.dot-status-badge.status-pending,
.dot-status-badge.status-on-hold {
    background: #fff3cd;
    color: #856404;
}

.dot-status-badge.status-pws-post {
    background: linear-gradient(135deg, rgba(51, 232, 93, 0.15) 0%, rgba(40, 199, 77, 0.15) 100%);
    color: #1e8e3e;
    border: 1px solid rgba(51, 232, 93, 0.3);
}

.dot-status-badge.status-processing {
    background: #cce5ff;
    color: #004085;
}

.dot-status-badge.status-completed {
    background: #d4edda;
    color: #155724;
}

.dot-status-badge.status-cancelled,
.dot-status-badge.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.dot-status-badge.status-refunded {
    background: #e2e3e5;
    color: #383d41;
}

/* Tracking Code Box */
.dot-tracking-box {
    background: linear-gradient(135deg, #33E85D 0%, #28c74d 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(51, 232, 93, 0.3);
}

.dot-tracking-box h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #fff;
    border-bottom: none;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot-tracking-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.dot-tracking-code-value {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    direction: ltr;
}

.dot-tracking-copy {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dot-tracking-copy:hover {
    background: rgba(255, 255, 255, 0.4);
}

.dot-tracking-copy.copied {
    background: #1e8e3e;
}

.dot-tracking-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #1e8e3e;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dot-tracking-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #166a30;
}

/* Items List */
.dot-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dot-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.dot-item:hover {
    background: rgba(51, 232, 93, 0.05);
}

.dot-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
}

.dot-item-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    font-size: 24px;
}

.dot-item-details {
    flex: 1;
}

.dot-item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.dot-item-qty {
    font-size: 13px;
    color: #666;
}

.dot-item-price {
    font-weight: 700;
    color: #33E85D;
}

/* Info Grid */
.dot-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dot-info-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.dot-info-item:hover {
    background: rgba(51, 232, 93, 0.05);
}

.dot-info-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.dot-info-value {
    font-weight: 600;
    color: #333;
}

/* Totals */
.dot-totals {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
}

.dot-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.dot-total-row:last-child {
    border-bottom: none;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 2px solid #33E85D;
}

.dot-total-row:last-child .dot-total-label,
.dot-total-row:last-child .dot-total-value {
    font-size: 18px;
    font-weight: 700;
    color: #33E85D;
}

/* Address */
.dot-address {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    line-height: 1.8;
}

/* Error & Empty States */
.dot-error-message,
.dot-empty-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.dot-error-message {
    color: #dc3545;
}

.dot-empty-message {
    color: #666;
}

.dot-error-icon,
.dot-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* Loading */
.dot-loading {
    text-align: center;
    padding: 40px;
}

.dot-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #33E85D;
    border-radius: 50%;
    animation: dot-spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

/* Responsive */
@media (max-width: 600px) {
    .dot-search-form {
        flex-direction: column;
    }
    
    .dot-search-btn {
        width: 100%;
    }
    
    .dot-search-section {
        padding: 30px 20px;
    }
    
    .dot-search-section h2 {
        font-size: 22px;
    }
    
    .dot-order-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .dot-order-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .dot-order-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .dot-info-grid {
        grid-template-columns: 1fr;
    }
    
    .dot-modal {
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
        margin-top: auto;
    }
    
    .dot-results-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .dot-tracking-code {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .dot-tracking-code-value {
        font-size: 18px;
    }
}