/**
 * Public styles for Jezweb WooCommerce Order & Shipment Tracking
 *
 * @package Jezweb_WOST
 */

/* Tracking Info Section */
.jezweb-wost-tracking-info {
    margin: 30px 0;
    padding: 20px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.jezweb-wost-tracking-info h2 {
    margin: 0 0 20px;
    padding: 0;
    font-size: 1.4em;
    color: #333;
}

/* Single Tracking Item */
.jezweb-wost-tracking-single {
    line-height: 1.8;
}

.jezweb-wost-tracking-single p {
    margin: 0 0 10px;
}

.jezweb-wost-tracking-single p:last-child {
    margin-bottom: 0;
    margin-top: 15px;
}

.jezweb-wost-tracking-single strong {
    color: #333;
}

.jezweb-wost-tracking-single .button {
    display: inline-block;
    margin-top: 5px;
}

/* Tracking Table */
.jezweb-wost-tracking-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.jezweb-wost-tracking-table th,
.jezweb-wost-tracking-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.jezweb-wost-tracking-table th {
    background: #f0f0f0;
    font-weight: 600;
    color: #333;
}

.jezweb-wost-tracking-table tbody tr:hover {
    background: #fafafa;
}

.jezweb-wost-tracking-table .button {
    white-space: nowrap;
}

/* Track Order Form (Shortcode) */
.jezweb-wost-track-order-wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.jezweb-wost-track-order-wrapper h2 {
    margin: 0 0 20px;
    padding: 0;
    font-size: 1.5em;
    color: #333;
    text-align: center;
}

.jezweb-wost-track-order-form .form-row {
    margin-bottom: 15px;
}

.jezweb-wost-track-order-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.jezweb-wost-track-order-form label .required {
    color: #e2401c;
}

.jezweb-wost-track-order-form .input-text {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.jezweb-wost-track-order-form .input-text:focus {
    border-color: #3c3c3c;
    outline: none;
}

.jezweb-wost-track-order-form .button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
}

.jezweb-wost-track-order-form .button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Track Order Results */
.jezweb-wost-track-order-results {
    margin-top: 20px;
}

.jezweb-wost-tracking-results {
    padding: 20px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.jezweb-wost-tracking-results h3 {
    margin: 0 0 10px;
    padding: 0;
    font-size: 1.3em;
    color: #333;
}

.jezweb-wost-tracking-results h4 {
    margin: 20px 0 15px;
    padding: 0;
    font-size: 1.1em;
    color: #333;
}

.jezweb-wost-no-tracking-message {
    color: #666;
    font-style: italic;
    margin: 15px 0;
}

/* My Account Orders Column */
.woocommerce-orders-table .woocommerce-orders-table__cell-jezweb-wost-tracking {
    text-align: center;
}

.woocommerce-orders-table .woocommerce-orders-table__cell-jezweb-wost-tracking small {
    display: inline-block;
    margin-left: 5px;
    color: #666;
}

/* Error/Success Messages */
.jezweb-wost-error {
    padding: 15px;
    margin-bottom: 15px;
    background: #fef7f7;
    border: 1px solid #e2401c;
    border-radius: 4px;
    color: #a00;
}

.jezweb-wost-success {
    padding: 15px;
    margin-bottom: 15px;
    background: #f0fff0;
    border: 1px solid #46b450;
    border-radius: 4px;
    color: #1e8522;
}

/* Loading State */
.jezweb-wost-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.jezweb-wost-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: jezweb-wost-spin 0.8s linear infinite;
}

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

/* Responsive */
@media screen and (max-width: 768px) {
    .jezweb-wost-tracking-table th,
    .jezweb-wost-tracking-table td {
        padding: 10px;
        font-size: 14px;
    }

    .jezweb-wost-track-order-wrapper {
        padding: 20px;
        margin: 0 10px;
    }

    /* Stack table on mobile */
    .jezweb-wost-tracking-table thead {
        display: none;
    }

    .jezweb-wost-tracking-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
    }

    .jezweb-wost-tracking-table tbody td {
        display: block;
        text-align: right;
        padding: 10px 15px;
        border-bottom: 1px solid #f0f0f0;
    }

    .jezweb-wost-tracking-table tbody td:last-child {
        border-bottom: none;
    }

    .jezweb-wost-tracking-table tbody td::before {
        content: attr(data-title);
        float: left;
        font-weight: 600;
        color: #333;
    }
}
