/* ELTA, Box Now & Easy Mail Tracking - Modern Design
   Version 2.0.0 */

/* CSS Isolation Layer - Override WoodMart Theme */
.elta-tracking-wrapper {
    /* Create a new stacking context */
    isolation: isolate;
    position: relative;
    z-index: 1;
}

/* Reset all WoodMart button variables in our wrapper */
.elta-tracking-wrapper {
    --btn-color: initial;
    --btn-brd-width: initial;
    --btn-brd-style: initial;
    --btn-brd-color: initial;
    --btn-bgcolor: initial;
    --btn-box-shadow: initial;
    --btn-transform: initial;
    --btn-font-weight: initial;
    --btn-font-family: initial;
    --btn-font-style: initial;
    --btn-padding: initial;
    --btn-height: initial;
    --btn-font-size: initial;
    --btn-color-hover: initial;
    --btn-brd-color-hover: initial;
    --btn-bgcolor-hover: initial;
    --btn-box-shadow-hover: initial;
    --btn-brd-radius: initial;
}

/* Variables - Thikishop Inspired */
:root {
    --primary-color: #2e6bc6;
    /* Thikishop primary blue */
    --secondary-color: #1a4fa0;
    /* Darker blue for hover */
    --accent-color: #00aeef;
    /* Light blue accent */
    --accent-hover: #0099d4;
    /* Darker accent for hover */
    --boxnow-color: #00a8e6;
    /* Box Now blue */
    --easymail-color: #ff6900;
    /* Easy Mail orange */
    --success-color: #7ed026;
    /* Green from thikishop gradient */
    --error-color: #ff5722;
    /* Red/orange for errors */
    --warning-color: #ffa726;
    /* Orange */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 5px;
    --radius-lg: 8px;
}

/* Container */
.elta-tracking-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
}

/* Header Section */
.tracking-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out;
}

.tracking-header .subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0;
    font-style: italic;
}

/* Form Section */
.tracking-form {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.6s ease-out;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input[type="text"] {
    width: 100%;
    padding: 15px 20px 15px 50px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-wrapper input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 107, 198, 0.1);
    transform: translateY(-1px);
}

.input-wrapper.has-value input[type="text"] {
    border-color: var(--primary-color);
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
    transition: color 0.3s ease;
}

.input-wrapper input[type="text"]:focus~.input-icon,
.input-wrapper.has-value .input-icon {
    color: var(--primary-color);
}

.input-hint {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-style: italic;
}

/* Button Styles - High Specificity to Override WoodMart */
.elta-tracking-wrapper .btn,
.elta-tracking-wrapper button.btn {
    /* Reset WoodMart styles */
    all: unset;

    /* Apply our styles with !important for critical properties */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 15px 35px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: auto !important;
    gap: 0 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    line-height: 1.2 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-style: normal !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.elta-tracking-wrapper .btn-primary,
.elta-tracking-wrapper button.btn-primary {
    /* Thikishop-inspired gradient */
    background: linear-gradient(135deg, #00aeef 0%, #2e6bc6 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(46, 107, 198, 0.3) !important;
}

.elta-tracking-wrapper .btn-primary:hover,
.elta-tracking-wrapper button.btn-primary:hover {
    background: linear-gradient(135deg, #0099d4 0%, #1a4fa0 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(46, 107, 198, 0.4) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

.elta-tracking-wrapper .btn-primary:active,
.elta-tracking-wrapper button.btn-primary:active {
    transform: translateY(0) !important;
    background: linear-gradient(135deg, #0099d4 0%, #1a4fa0 100%) !important;
}

.elta-tracking-wrapper .btn-primary:disabled,
.elta-tracking-wrapper button.btn-primary:disabled,
.elta-tracking-wrapper .btn-primary[disabled],
.elta-tracking-wrapper button.btn-primary[disabled] {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    background: linear-gradient(135deg, #00aeef 0%, #2e6bc6 100%) !important;
}

/* Focus states */
.elta-tracking-wrapper .btn-primary:focus,
.elta-tracking-wrapper button.btn-primary:focus {
    outline: 2px solid #2e6bc6 !important;
    outline-offset: 2px !important;
}

.btn-text {
    margin-right: 8px;
}

.btn-icon {
    font-size: 18px;
}

/* Spinner Animation */
.spinner {
    display: none;
    margin-left: 10px;
}

.spinner>div {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 100%;
    display: inline-block;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
    margin: 0 2px;
}

.spinner .bounce1 {
    animation-delay: -0.32s;
}

.spinner .bounce2 {
    animation-delay: -0.16s;
}

.btn.loading .spinner {
    display: inline-flex;
}

.btn.loading .btn-text,
.btn.loading .btn-icon {
    display: none;
}

@keyframes sk-bouncedelay {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* Message Boxes */
.message-box {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin: 20px 0;
    display: none;
    font-size: 15px;
    line-height: 1.5;
    animation: slideInDown 0.3s ease-out;
}

.message-box i {
    margin-right: 8px;
    font-size: 18px;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.error-message i {
    color: #c62828;
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.success-message i {
    color: #2e7d32;
}


/* Results Section */
.tracking-results {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
    display: none;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.5s ease-out;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bg-light);
}

.results-header h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
}

.results-header h3 i {
    color: var(--primary-color);
    margin-right: 10px;
}

.tracking-number {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.tracking-number:hover {
    color: var(--primary-color);
}

.tracking-number i {
    margin-right: 5px;
}

/* Timeline */
.timeline-container {
    position: relative;
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 30px;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s ease;
}

.timeline-item.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.timeline-marker {
    position: absolute;
    left: -25px;
    top: 0;
    width: 30px;
    height: 30px;
    background: var(--bg-white);
    border: 3px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-marker i {
    font-size: 14px;
    color: var(--text-secondary);
}

.timeline-item.latest .timeline-marker {
    width: 36px;
    height: 36px;
    left: -28px;
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(46, 107, 198, 0.2);
}

.timeline-item.latest .timeline-marker i {
    color: white;
    font-size: 16px;
}

.timeline-content {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.timeline-item.latest .timeline-content {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #90caf9;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.timeline-date {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.timeline-time {
    font-size: 12px;
    color: var(--text-light);
}

.timeline-location {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-location i {
    color: var(--primary-color);
    margin-right: 5px;
}

.timeline-status {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Status Icons */
.status-delivered .timeline-marker {
    background: var(--success-color);
    border-color: var(--success-color);
}

.status-delivered .timeline-marker i {
    color: white;
}

.status-transit .timeline-marker {
    background: var(--warning-color);
    border-color: var(--warning-color);
}

.status-transit .timeline-marker i {
    color: white;
}

.status-processing .timeline-marker {
    background: #2196f3;
    border-color: #2196f3;
}

.status-processing .timeline-marker i {
    color: white;
}



/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

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

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .elta-tracking-wrapper {
        padding: 10px;
    }

    .tracking-form {
        padding: 25px;
    }

    .btn {
        width: 100%;
        padding: 15px 20px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tracking-number {
        margin-top: 10px;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-marker {
        left: -20px;
        width: 26px;
        height: 26px;
    }

    .timeline-item.latest .timeline-marker {
        width: 30px;
        height: 30px;
        left: -22px;
    }

    .timeline-header {
        flex-direction: column;
    }

    .timeline-time {
        margin-top: 5px;
    }
}

/* Print Styles */
@media print {
    .elta-tracking-wrapper {
        max-width: 100%;
    }

    .tracking-form {
        display: none;
    }

    .tracking-results {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .btn {
        display: none;
    }

    .timeline-item {
        opacity: 1 !important;
        transform: none !important;
    }
}