/**
 * Line Order Query CSS
 * 
 * 訂單查詢界面的樣式
 * 
 * @package Line_Login_Push
 * @since 1.0.0
 */

/* 容器樣式 */
.line-order-query-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.line-order-query-form {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.line-order-query-form h3 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.line-order-query-form .description {
    color: #7f8c8d;
    margin: 0 0 25px 0;
    font-size: 16px;
    line-height: 1.5;
}

/* 表單樣式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="tel"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.line-order-query-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.line-order-query-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.line-order-query-btn:active {
    transform: translateY(0);
}

/* 載入動畫 */
.line-order-query-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.line-order-query-loading p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

/* 結果區域 */
.line-order-query-result {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-top: 20px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.result-header h4 {
    color: #2c3e50;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.result-count {
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
}

/* 訂單項目 */
.order-item {
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.order-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.order-header {
    padding: 20px;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.order-header:hover {
    background: #f8f9fa;
}

.order-header.collapsed .order-details {
    display: none;
}

.order-info h5 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.order-date {
    color: #7f8c8d;
    font-size: 14px;
}

/* 狀態徽章 */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.status-processing {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

.status-on-hold {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.status-completed {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.status-refunded {
    background: #e2e3e5;
    color: #383d41;
    border-left-color: #6c757d;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

/* 訂單詳情 */
.order-details {
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #ecf0f1;
}

.order-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-item {
    color: #2c3e50;
    font-size: 14px;
}

.summary-item strong {
    color: #34495e;
    font-weight: 600;
}

/* 商品明細 */
.order-items {
    margin-bottom: 25px;
}

.order-items h6 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #ecf0f1;
}

.order-items ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.order-items li:last-child {
    border-bottom: none;
}

.item-name {
    flex: 1;
    color: #2c3e50;
    font-weight: 500;
}

.item-quantity {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0 15px;
}

.item-total {
    color: #27ae60;
    font-weight: 600;
    font-size: 14px;
}

/* 地址區域 */
.order-addresses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.address-section h6 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 5px;
    border-bottom: 2px solid #ecf0f1;
}

.address-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.address-content p {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.4;
}

.address-content p:last-child {
    margin-bottom: 0;
}

.address-content p strong {
    color: #34495e;
    font-weight: 600;
}

/* 訂單備註 */
.order-notes {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
}

.order-notes h6 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
}

.order-notes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-notes li {
    background: #f8f9fa;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 3px solid #3498db;
}

.order-notes li:last-child {
    margin-bottom: 0;
}

.note-date {
    display: block;
    color: #7f8c8d;
    font-size: 12px;
    margin-bottom: 5px;
    font-weight: 500;
}

.note-content {
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.4;
}

/* 訊息樣式 */
.error-message,
.success-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* 重新查詢按鈕 */
.re-query-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.re-query-btn:hover {
    background: #5a6268;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .line-order-query-container {
        padding: 15px;
    }
    
    .line-order-query-form {
        padding: 20px;
    }
    
    .line-order-query-form h3 {
        font-size: 20px;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .order-summary {
        grid-template-columns: 1fr;
    }
    
    .order-addresses {
        grid-template-columns: 1fr;
    }
    
    .order-items li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .item-quantity {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .line-order-query-container {
        padding: 10px;
    }
    
    .line-order-query-form {
        padding: 15px;
    }
    
    .order-details {
        padding: 15px;
    }
    
    .order-summary {
        padding: 10px;
    }
    
    .address-content {
        padding: 10px;
    }
}

/* 動畫效果 */
.order-item {
    animation: fadeInUp 0.5s ease-out;
}

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

/* 載入動畫增強 */
.line-order-query-loading {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 狀態徽章動畫 */
.status-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

/* 無障礙設計 */
.line-order-query-btn:focus,
.form-group input[type="tel"]:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* 高對比模式支援 */
@media (prefers-contrast: high) {
    .line-order-query-form,
    .line-order-query-result {
        border: 2px solid #000;
    }
    
    .status-badge {
        border: 1px solid #000;
    }
}

/* 減少動畫模式 */
@media (prefers-reduced-motion: reduce) {
    .order-item,
    .line-order-query-loading,
    .status-badge {
        animation: none;
    }
    
    .line-order-query-btn:hover {
        transform: none;
    }
    
    .order-item:hover {
        transform: none;
    }
} 