/* ESTY Shipping Plugin - Customer Styles */

:root {
    --esty-blue: #1e40af;
    --esty-orange: #f97316;
    --esty-light-blue: #dbeafe;
    --esty-light-orange: #fed7aa;
    --esty-gray: #6b7280;
    --esty-light-gray: #f3f4f6;
    --esty-border: #e5e7eb;
    --esty-success: #10b981;
    --esty-warning: #f59e0b;
    --esty-error: #ef4444;
}

/* Customer Dashboard */
.esty-customer-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.esty-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.esty-dashboard-card {
    background: white;
    border: 2px solid var(--esty-border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.esty-dashboard-card:hover {
    border-color: var(--esty-blue);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.1);
    transform: translateY(-2px);
}

.esty-dashboard-card h3 {
    color: var(--esty-blue);
    margin: 0 0 10px 0;
    font-size: 24px;
}

.esty-dashboard-card p {
    color: var(--esty-gray);
    margin: 0 0 20px 0;
}

/* Buttons */
.esty-button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--esty-blue);
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.esty-button:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 64, 175, 0.2);
}

.esty-button-primary {
    background: var(--esty-orange);
}

.esty-button-primary:hover {
    background: #ea580c;
}

/* Forms */
.esty-form-group {
    margin-bottom: 20px;
}

.esty-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--esty-blue);
    font-weight: 600;
}

.esty-form-group input[type="text"],
.esty-form-group input[type="url"],
.esty-form-group input[type="number"],
.esty-form-group input[type="tel"],
.esty-form-group select,
.esty-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--esty-border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.esty-form-group input:focus,
.esty-form-group select:focus,
.esty-form-group textarea:focus {
    outline: none;
    border-color: var(--esty-blue);
}

.esty-form-group small {
    display: block;
    margin-top: 5px;
    color: var(--esty-gray);
    font-size: 14px;
}

.esty-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Orders */
.esty-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.esty-order-card {
    background: white;
    border: 2px solid var(--esty-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.esty-order-card:hover {
    border-color: var(--esty-blue);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.1);
}

.esty-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--esty-light-gray);
}

.esty-orders-table {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.esty-order-row {
    background: white;
    border: 2px solid var(--esty-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.esty-order-info {
    flex: 1;
}

.esty-order-info h4 {
    margin: 0 0 10px 0;
    color: var(--esty-blue);
}

.esty-order-info p {
    margin: 5px 0;
    color: var(--esty-gray);
}

.esty-order-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* Status Badges */
.esty-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: capitalize;
}

.esty-status-pending {
    background: var(--esty-light-gray);
    color: var(--esty-gray);
}

.esty-status-payment_pending,
.esty-status-payment-pending {
    background: var(--esty-light-orange);
    color: #9a3412;
}

.esty-status-paid {
    background: #d1fae5;
    color: #065f46;
}

.esty-status-processing {
    background: var(--esty-light-blue);
    color: var(--esty-blue);
}

.esty-status-shipped {
    background: #ddd6fe;
    color: #5b21b6;
}

.esty-status-arrived {
    background: #fef3c7;
    color: #92400e;
}

.esty-status-clearing {
    background: #fde68a;
    color: #78350f;
}

.esty-status-cleared {
    background: #bfdbfe;
    color: #1e40af;
}

.esty-status-delivered {
    background: #d1fae5;
    color: #065f46;
}

.esty-status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* Filters */
.esty-orders-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.esty-filter-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--esty-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.esty-filter-btn:hover {
    border-color: var(--esty-blue);
    color: var(--esty-blue);
}

.esty-filter-btn.active {
    background: var(--esty-blue);
    color: white;
    border-color: var(--esty-blue);
}

/* Addresses */
.esty-addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.esty-address-card {
    background: white;
    border: 2px solid var(--esty-border);
    border-radius: 12px;
    padding: 20px;
}

.esty-address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--esty-light-gray);
}

.esty-address-header h4 {
    margin: 0;
    color: var(--esty-blue);
}

.esty-badge {
    padding: 4px 8px;
    background: var(--esty-orange);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.esty-address-card p {
    margin: 5px 0;
    color: var(--esty-gray);
}

.esty-address-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Modal */
.esty-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.esty-modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.esty-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--esty-gray);
    cursor: pointer;
}

.esty-modal-close:hover {
    color: var(--esty-error);
}

/* Alerts */
.esty-alert {
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.esty-alert-success {
    background: #d1fae5;
    border: 2px solid var(--esty-success);
    color: #065f46;
}

.esty-alert-success h3 {
    margin: 0 0 10px 0;
    color: #065f46;
}

/* Responsive */
@media (max-width: 768px) {
    .esty-form-row {
        grid-template-columns: 1fr;
    }
    
    .esty-order-row {
        flex-direction: column;
    }
    
    .esty-order-status {
        align-items: flex-start;
    }
}

/* Login Prompt Styles */
.esty-login-prompt {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--esty-light-blue) 0%, #ffffff 100%);
    border-radius: 16px;
    margin: 20px 0;
}

.esty-login-card {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(30, 64, 175, 0.15);
    animation: fadeInUp 0.6s ease;
}

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

.esty-login-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.esty-login-card h2 {
    color: var(--esty-blue);
    font-size: 32px;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.esty-login-card > p {
    color: var(--esty-gray);
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 30px 0;
}

.esty-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.esty-login-btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.esty-login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.esty-login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.esty-btn-primary {
    background: linear-gradient(135deg, var(--esty-blue) 0%, #1e3a8a 100%);
    color: white !important;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.esty-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

.esty-btn-secondary {
    background: linear-gradient(135deg, var(--esty-orange) 0%, #ea580c 100%);
    color: white !important;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.esty-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.esty-login-help {
    margin-top: 20px;
    font-size: 14px;
    color: var(--esty-gray);
}

.esty-login-help a {
    color: var(--esty-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.esty-login-help a:hover {
    color: var(--esty-orange);
    text-decoration: underline;
}

/* Responsive Login */
@media (max-width: 768px) {
    .esty-login-card {
        padding: 40px 30px;
    }
    
    .esty-login-card h2 {
        font-size: 26px;
    }
    
    .esty-login-btn {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .esty-login-icon {
        font-size: 48px;
    }
}


/* Public Order Tracking */
.esty-track-order-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.esty-track-header {
    text-align: center;
    margin-bottom: 30px;
}

.esty-track-header h2 {
    color: var(--esty-blue);
    font-size: 32px;
    margin: 0 0 10px 0;
}

.esty-track-header p {
    color: var(--esty-gray);
    font-size: 16px;
}

.esty-track-form {
    background: white;
    border: 2px solid var(--esty-border);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.esty-track-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.esty-track-input-group input {
    flex: 1;
    min-width: 250px;
    padding: 14px 18px;
    border: 2px solid var(--esty-border);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.esty-track-input-group input:focus {
    outline: none;
    border-color: var(--esty-blue);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.esty-track-btn {
    padding: 14px 30px;
    background: linear-gradient(135deg, var(--esty-blue) 0%, #1e3a8a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.esty-track-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.esty-track-result {
    background: white;
    border: 2px solid var(--esty-border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    animation: slideIn 0.4s ease;
}

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

.esty-track-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--esty-border);
}

.esty-track-result-header h3 {
    color: var(--esty-blue);
    margin: 0;
    font-size: 24px;
}

.esty-track-info {
    margin-bottom: 30px;
}

.esty-track-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--esty-light-gray);
}

.esty-track-info-row.esty-track-total {
    border-top: 2px solid var(--esty-border);
    border-bottom: none;
    margin-top: 10px;
    padding-top: 15px;
    font-weight: 600;
    font-size: 18px;
}

.esty-track-label {
    color: var(--esty-gray);
    font-weight: 500;
}

.esty-track-value {
    color: #1f2937;
    font-weight: 600;
}

.esty-track-value a {
    color: var(--esty-blue);
    text-decoration: none;
}

.esty-track-value a:hover {
    text-decoration: underline;
}

/* Timeline */
.esty-track-timeline {
    margin: 30px 0;
}

.esty-track-timeline h4 {
    color: var(--esty-blue);
    margin: 0 0 20px 0;
    font-size: 20px;
}

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

.esty-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--esty-light-gray);
}

.esty-timeline-item {
    position: relative;
    margin-bottom: 30px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.esty-timeline-item.active {
    opacity: 1;
}

.esty-timeline-item.active .esty-timeline-dot {
    background: var(--esty-blue);
    border-color: var(--esty-blue);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.2);
}

.esty-timeline-dot {
    position: absolute;
    left: -33px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--esty-border);
    transition: all 0.3s ease;
}

.esty-timeline-content strong {
    display: block;
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 4px;
}

.esty-timeline-content span {
    color: var(--esty-gray);
    font-size: 14px;
}

.esty-track-notes {
    background: var(--esty-light-blue);
    border-left: 4px solid var(--esty-blue);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.esty-track-notes h4 {
    color: var(--esty-blue);
    margin: 0 0 10px 0;
    font-size: 18px;
}

.esty-track-notes p {
    color: #1f2937;
    margin: 0;
    line-height: 1.6;
}

.esty-track-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--esty-border);
    color: var(--esty-gray);
}

.esty-track-footer a {
    color: var(--esty-blue);
    text-decoration: none;
    font-weight: 600;
}

.esty-track-footer a:hover {
    text-decoration: underline;
    color: var(--esty-orange);
}

/* Responsive */
@media (max-width: 768px) {
    .esty-track-input-group {
        flex-direction: column;
    }
    
    .esty-track-input-group input {
        min-width: 100%;
    }
    
    .esty-track-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .esty-track-info-row {
        flex-direction: column;
        gap: 5px;
    }
}

/* Page Header with Back Button */
.esty-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--esty-border);
    flex-wrap: wrap;
    gap: 15px;
}

.esty-page-header h2 {
    margin: 0;
    color: var(--esty-blue);
    font-size: 28px;
}

.esty-page-header .esty-button {
    margin: 0;
}

/* Responsive Page Header */
@media (max-width: 768px) {
    .esty-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .esty-page-header h2 {
        font-size: 24px;
    }
    
    .esty-page-header .esty-button {
        width: 100%;
        text-align: center;
    }
}

/* Dashboard Header with Logout */
.esty-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--esty-border);
    flex-wrap: wrap;
    gap: 15px;
}

.esty-dashboard-header h2 {
    margin: 0;
    color: var(--esty-blue);
    font-size: 28px;
}

/* Page Actions Container */
.esty-page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Logout Button */
.esty-button-logout {
    background: #ef4444 !important;
    color: white !important;
    border: 2px solid #ef4444 !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.esty-button-logout:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Responsive Dashboard Header */
@media (max-width: 768px) {
    .esty-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .esty-dashboard-header h2 {
        font-size: 24px;
    }
    
    .esty-page-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .esty-page-actions .esty-button {
        width: 100%;
        text-align: center;
    }
    
    .esty-button-logout {
        width: 100%;
        text-align: center;
    }
}
