/**
 * WooCommerce 17Track Shipment Tracking - Frontend Styles
 */

.woo-17track-tracking-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

.woo-17track-tracking-page h2 {
    text-align: center;
    margin-bottom: 30px;
}

.tracking-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    position: relative;
    bottom: -2px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    color: #756c98;
    border-bottom-color: #756c98;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tracking-form {
    background: #f9fafb;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #756c98;
    box-shadow: 0 0 0 3px rgba(117, 108, 152, 0.1);
}

.tracking-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: #756c98;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.tracking-submit-btn:hover {
    background: #635a82;
}

.order-lookup-result {
    margin-top: 20px;
}

.lookup-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 20px;
    border-radius: 8px;
}

.lookup-success h4 {
    margin: 0 0 15px 0;
    color: #155724;
}

.found-tracking {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    flex-wrap: wrap;
}

.found-tracking:last-child {
    border-bottom: none;
}

.found-tracking code {
    background: rgba(0,0,0,0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.found-tracking .track-this {
    margin-left: auto;
    padding: 6px 16px;
    background: #756c98;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.lookup-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
}

.tracking-result {
    margin-top: 30px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.result-header h3 {
    margin: 0;
    font-size: 16px;
}

.close-result {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
}

#YQContainer {
    min-height: 200px;
}

.tracking-external-link {
    padding: 15px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.tracking-external-link a {
    color: #756c98;
    text-decoration: none;
}

/* Order Details Page */
.woo-17track-tracking-info {
    margin: 30px 0;
}

.woo-17track-tracking-info h2 {
    margin-bottom: 20px;
}

.tracking-item-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.tracking-item-card .tracking-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f3f4f6;
}

.tracking-item-card .tracking-number {
    margin-bottom: 20px;
}

.tracking-item-card .tracking-number code {
    font-size: 18px;
    font-weight: 600;
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
}

.tracking-item-card .tracking-widget-container {
    margin: 20px 0;
    min-height: 150px;
}

.tracking-item-card .tracking-actions .button {
    display: inline-block;
    padding: 10px 20px;
    background: #756c98;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}

.tracking-item-card .tracking-actions .button:hover {
    background: #635a82;
}

@media (max-width: 600px) {
    .tracking-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
    }
    
    .found-tracking .track-this {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
}
