/* Authentication Pages Styling */

/* Align with premium black theme (style.css) */
:root {
    --color-primary: #000000;
    --color-primary-dark: #1a1a1a;
    --color-primary-light: #f5f5f5;
    --color-text: #1a1a1a;
    --color-text-light: #666666;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 40px;
    --space-12: 96px;
}

/* Button Base Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 52px;
    white-space: nowrap;
}

/* Primary Button — premium black */
.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-primary:disabled {
    background: #BDBDBD;
    border-color: #BDBDBD;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* Secondary Button */
.btn-secondary {
    background: #ffffff;
    color: var(--color-text);
    border-color: #E0E0E0;
}

.btn-secondary:hover:not(:disabled) {
    background: #F5F5F5;
    border-color: #BDBDBD;
}

.btn-secondary:disabled {
    background: #F5F5F5;
    color: #BDBDBD;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Small Button */
.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 36px;
    border-radius: 6px;
}

/* Full Width Button */
.btn-full {
    width: 100%;
}

/* Button Content */
.btn-text {
    display: inline-block;
}

.btn-loader {
    display: none;
}

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

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

/* Link Button */
.btn-link,
.link-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    font-weight: 500;
}

.btn-link:hover,
.link-btn:hover {
    color: var(--color-primary-dark);
}

.btn-link:disabled,
.link-btn:disabled {
    color: #BDBDBD;
    text-decoration: none;
    cursor: not-allowed;
}

.btn-link.danger {
    color: #d32f2f;
}

.btn-link.danger:hover {
    color: #b71c1c;
}

/* Action Button (for address cards) */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    background: #F5F5F5;
    color: var(--color-text);
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-action svg {
    width: 16px;
    height: 16px;
}

.btn-action:hover {
    background: #E0E0E0;
}

.btn-action.danger {
    color: #d32f2f;
}

.btn-action.danger:hover {
    background: #ffebee;
}

/* Form Input Styles */
.form-input,
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: var(--color-text);
    background: #ffffff;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.form-input:disabled,
.form-control:disabled {
    background: #F5F5F5;
    color: #BDBDBD;
    cursor: not-allowed;
}

/* Form Error */
.form-error {
    display: block;
    color: #d32f2f;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

/* Form Group with Error */
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
    border-color: #d32f2f !important;
    background-color: #ffebee;
}

.form-group.has-error input:focus,
.form-group.has-error textarea:focus,
.form-group.has-error select:focus {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1) !important;
}

/* Spinner Animation */
.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Address Card Default Badge */
.default-badge {
    background: var(--color-primary);
    color: #ffffff;
}

/* Recent Orders list */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.order-item {
    border-radius: 10px;
    padding: 10px 14px;
    background: #fafafa;
    border: 1px solid #eeeeee;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.order-item-link:hover .order-item {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
    border-color: #e0e0e0;
}

.order-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.order-number {
    font-weight: 600;
}

.order-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #757575;
}

.order-total {
    font-weight: 600;
    color: #212121;
}

.order-progress {
    margin-top: 4px;
}

.order-progress-track {
    position: relative;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: #eeeeee;
    overflow: hidden;
}

.order-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: inherit;
    background: #4caf50;
    width: 20%;
    transition: width 0.25s ease;
}

.order-progress-fill.step-placed {
    width: 20%;
}

.order-progress-fill.step-confirmed {
    width: 45%;
}

.order-progress-fill.step-shipped {
    width: 75%;
}

.order-progress-fill.step-delivered {
    width: 100%;
}

.order-progress-fill.step-cancelled {
    width: 100%;
    background: #e53935;
}

/* Status Badges */
.status-placed {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-shipped {
    background: #cfe2ff;
    color: #084298;
}

.status-delivered {
    background: #d1f4dd;
    color: #0f5132;
}

.status-cancelled {
    background: #f8d7da;
    color: #842029;
}

.status-paid {
    background: #d1f4dd;
    color: #0f5132;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-failed {
    background: #f8d7da;
    color: #842029;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .btn {
        padding: 12px 20px;
        font-size: 15px;
        min-height: 48px;
    }
    
    .btn-small {
        padding: 6px 12px;
        font-size: 13px;
        min-height: 32px;
    }
    
    /* Address Form Mobile Adjustments */
    .form-error {
        font-size: 14px;
        margin-top: 8px;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .form-group {
        margin-bottom: var(--space-2);
    }
    
    .form-group.has-error {
        margin-bottom: var(--space-4);
    }
    
    .form-input,
    .form-control {
        font-size: 16px;
        padding: 14px 16px;
    }
}

