/* =========================================
   EFENA PREMIUM THEME - ORDER TRACKING
   Based on Black/White/Metallic aesthetic
   ========================================= */

/* Reset & Fonts */
.efena-tracking-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: #ffffff;
    font-family: 'Arial', sans-serif;
    color: #000000;
    padding: 60px 0;
}

.efena-tracking-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

/* Header */
.efena-tracking-header {
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.efena-tracking-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.efena-tracking-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 400;
    color: #708090;
    /* Metallic Grey */
    font-style: italic;
    margin-bottom: 40px;
}

/* Form Styles */
.efena-tracking-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.efena-form-group {
    margin-bottom: 25px;
}

.efena-form-group label {
    display: block;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: #000000;
    margin-bottom: 8px;
}

.efena-form-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    /* Square/Modern */
    font-size: 1rem;
    color: #000000;
    background: #ffffff;
    transition: all 0.3s ease;
    font-family: 'Arial', sans-serif;
}

.efena-form-group input:focus {
    border-color: #000000;
    outline: none;
    background: #fafafa;
}

.efena-form-actions {
    margin-top: 40px;
    text-align: center;
}

/* Premium Button */
.efena-submit-btn {
    display: inline-block;
    width: 100%;
    padding: 18px 30px;
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 0;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.efena-submit-btn:hover {
    background: #ffffff;
    color: #000000;
}

.efena-submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Loader */
.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
    vertical-align: middle;
    margin-left: 10px;
}

.efena-submit-btn:hover .btn-loader {
    border-color: #000000;
    border-bottom-color: transparent;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Messages */
.efena-form-message {
    margin-top: 20px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.efena-form-message.error {
    color: #b91c1c;
}

.efena-form-message.success {
    color: #000000;
}

/* ============================
   RESULTS & TIMELINE
   ============================ */
.efena-tracking-result {
    max-width: 1000px;
    margin: 60px auto 0;
    border-top: 1px solid #e0e0e0;
    /* Subtle separator */
    padding-top: 60px;
    animation: fadeInUp 0.8s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Timeline Container */
.efena-timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin: 40px 0 60px;
    padding: 0 20px;
}

/* Timeline Track */
.efena-timeline-track {
    position: absolute;
    top: 25px;
    /* Centers with icons usually */
    left: 10%;
    /* Adjust based on step width */
    right: 10%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

/* Step Item */
.efena-timeline-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
    text-align: center;
}

/* Icon Circle */
.efena-step-icon {
    width: 50px;
    height: 50px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    /* Default inactive grey */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #e0e0e0;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

/* Step Label */
.efena-step-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999999;
}

.efena-step-date {
    font-size: 0.75rem;
    color: #708090;
    margin-top: 5px;
    font-weight: 400;
}

/* Active State (Current) - Highlighted */
.efena-timeline-step.current {
    position: relative;
}

.efena-timeline-step.current::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 100px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
    border-radius: 12px;
    z-index: -1;
}

.efena-timeline-step.current .efena-step-icon {
    border-color: #22c55e;
    background: #22c55e;
    color: #ffffff;
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    animation: pulse-green 2s infinite;
}

.efena-timeline-step.current .efena-step-label {
    color: #22c55e;
    font-weight: 700;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(34, 197, 94, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    }
}

/* Completed State */
.efena-timeline-step.completed .efena-step-icon {
    border-color: #000000;
    background: #ffffff;
    color: #000000;
}

.efena-timeline-step.completed .efena-step-label {
    color: #000000;
}

/* Status Box & Invoice Area */
.efena-current-status-box {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
}

.efena-current-status-box h4 {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
    margin-bottom: 20px;
    color: #000000;
}

/* Status Description */
.efena-status-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #333;
    max-width: 600px;
    margin: 0 auto 25px;
    padding: 20px;
    background: #fff;
    border-left: 4px solid #22c55e;
    text-align: left;
    border-radius: 0 8px 8px 0;
}

/* Alert Messages */
.efena-alert {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.6;
}

.efena-alert-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.efena-alert-danger {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

/* Invoice / Details Grid */
.efena-invoice {
    border: 1px solid #e0e0e0;
    background: #ffffff;
}

.efena-invoice-header {
    background: #000000;
    padding: 15px 20px;
    color: #ffffff;
}

.efena-invoice-header h3 {
    margin: 0;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    font-weight: 400;
}

.efena-invoice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.efena-invoice-section h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    border-bottom: 1px solid #000000;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Button Secondary */
.efena-btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #000000;
    /* Black border */
    background: transparent;
    color: #000000;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.efena-btn-secondary:hover {
    background: #000000;
    color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
    .efena-tracking-wrapper {
        padding: 40px 0;
    }

    .efena-tracking-title {
        font-size: 2rem;
    }

    .efena-submit-btn {
        width: 100%;
    }

    .efena-timeline {
        flex-direction: column;
        padding-left: 40px;
    }

    .efena-timeline-track {
        left: 24px;
        top: 0;
        bottom: 0;
        width: 2px;
        height: auto;
    }

    .efena-timeline-step {
        width: 100%;
        flex-direction: row;
        margin-bottom: 30px;
        text-align: left;
    }

    .efena-step-icon {
        margin-right: 20px;
        margin-bottom: 0;
    }

    .efena-invoice-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
}

/* Order List (Multiple Results) */
.efena-order-card {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    transition: all 0.2s;
}

.efena-order-card:hover {
    border-color: #000000;
}

.efena-btn-small {
    background: #000000;
    color: #fff;
    padding: 8px 15px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
}

.efena-btn-small:hover {
    opacity: 0.8;
}

/* ============================
   INVOICE EMAIL STYLE
   ============================ */
.efena-invoice-email-style {
    background: #fff;
    padding: 20px;
}

.efena-email-header {
    text-align: center;
    margin-bottom: 30px;
}

.efena-email-header h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.efena-email-table {
    width: 100%;
    border-collapse: collapse;
}

.efena-email-table th,
.efena-email-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
}

.efena-email-table thead th {
    border-bottom: 2px solid #000;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.efena-email-table tfoot th,
.efena-email-table tfoot td {
    border-bottom: none;
    padding: 8px;
}

/* Addresses Section */
.efena-email-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.efena-email-addresses .address-col h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.efena-email-addresses .address-box {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
}

/* ============================
   RESPONSIVE - INVOICE TABLE
   ============================ */
@media (max-width: 768px) {
    /* Timeline current highlight adjustment for mobile */
    .efena-timeline-step.current::before {
        top: -10px;
        left: -10px;
        transform: none;
        width: calc(100% + 20px);
        height: calc(100% + 20px);
    }

    /* Invoice table responsive */
    .efena-email-items {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .efena-email-table {
        min-width: 100%;
    }

    .efena-email-table .td-img {
        display: none;
    }

    .efena-email-table .td-product {
        font-size: 0.85rem;
    }

    .efena-email-table th,
    .efena-email-table td {
        padding: 10px 5px;
        font-size: 0.8rem;
    }

    .efena-email-table tfoot th {
        font-size: 0.75rem;
    }

    /* Addresses responsive - stack vertically */
    .efena-email-addresses {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .efena-email-addresses .address-col {
        padding: 15px;
        background: #f9f9f9;
        border-radius: 8px;
    }

    /* Invoice email style padding */
    .efena-invoice-email-style {
        padding: 15px 10px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .efena-email-table thead {
        display: none;
    }

    .efena-email-table tbody tr {
        display: block;
        margin-bottom: 15px;
        padding: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
    }

    .efena-email-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px dashed #eee;
    }

    .efena-email-table tbody td:last-child {
        border-bottom: none;
    }

    .efena-email-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.7rem;
        color: #666;
    }

    .efena-email-table tfoot tr {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
    }

    .efena-email-table tfoot th {
        text-align: left;
    }

    .efena-email-table tfoot td {
        text-align: right;
    }
}