/* ========================================
   CUSTOM SECTIONS 4
   ======================================== */

/* ========================================
   Order Details Pages (order-)
   Prefix: order-
   Beskrivning: Orderdetaljer och statusuppdateringar
   ======================================== */


.order-customer-section {
    margin-bottom: 2rem;
}

.order-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 1.5rem 0;
}

.order-customer-info {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    overflow: hidden;
}

.order-customer-info table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.order-customer-info tr {
    border-bottom: 1px solid #f0f0f0;
}

.order-customer-info tr:last-child {
    border-bottom: none;
}

.order-customer-info td {
    padding: 1rem 1.5rem;
}

.order-customer-info td:first-child {
    font-weight: 500;
    color: var(--text-gray);
    width: 200px;
    background: #fafafa;
}

.order-customer-info td:last-child {
    color: var(--primary-color);
}

.order-field-value {
    display: inline-block;
    margin-right: 0;
}

.order-customer-info a {
    color: #0066cc;
    text-decoration: none;
    margin-left: 12px;
    font-size: 0.9em;
    font-weight: 500;
}

.order-customer-info a:hover {
    text-decoration: underline;
}

.order-section {
    margin-bottom: 2rem;
}

.order-section-subtitle {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.order-table-wrapper {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    overflow: hidden;
}

.order-test-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px dashed var(--border-color);
    text-align: center;
}

/* Delivery Success Styles */
.order-delivery-success {
    background: #f0f7ff;
    border: 1px solid #d4e4f7;
    padding: 1.25rem;
    border-radius: var(--radius-medium);
    text-align: center;
    margin-top: 0.75rem;
}

.order-delivery-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin-bottom: 0.75rem;
    line-height: 40px;
    font-size: 20px;
}

.order-delivery-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    margin-top: 0;
}

.order-delivery-subtitle {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.order-report-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.order-report-button:hover {
    background: #001830;
    transform: translateY(-1px);
    text-decoration: none;
}

.order-status-pending,
.order-polling-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.order-polling-inline {
    background: #f0f8ff;
    padding: 4px 10px;
    border-radius: 4px;
}

.order-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    border: 2px solid #e0e0e0;
    border-top-color: #001020;
    border-radius: 50%;
    animation: order-spin 1s linear infinite;
    flex-shrink: 0;
}

.order-loading-text,
.order-polling-text {
    color: #666;
    font-size: 0.9em;
}

@keyframes order-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.order-field-edit {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    width: 250px;
}

.order-field-edit:focus {
    outline: none;
    border-color: var(--primary-color);
}

.order-field-edit-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-edit-actions {
    margin-left: 10px;
}

.order-save-btn,
.order-cancel-btn {
    padding: 4px 12px;
    border-radius: 4px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    margin-right: 5px;
}

.order-save-btn {
    background: var(--primary-color);
    color: white;
}

.order-save-btn:hover {
    background: #001830;
}

.order-cancel-btn {
    background: #f0f0f0;
    color: #666;
}

.order-cancel-btn:hover {
    background: #e0e0e0;
}

.order-edit-link {
    color: #0066cc;
    text-decoration: none;
    margin-left: 12px;
    font-size: 0.9em;
    font-weight: 500;
}

.order-edit-link:hover {
    text-decoration: underline;
}

/* ========================================
   Error Pages (404)
   Prefix: error-
   ======================================== */

.error-page-container {
    min-height: calc(100vh - 300px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.error-page-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

/* Large Error Number Display */
.error-page-number {
    font-family: "Bebas Neue", sans-serif;
    font-size: 150px;
    line-height: 1;
    margin-bottom: 2rem;
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.error-page-number span {
    display: inline-block;
    position: relative;
}

/* Error Title and Description */
.error-page-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-page-description {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
}

/* Error Quick Links */
.error-page-links {
    margin-bottom: 2rem;
}

.error-links-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.error-link-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.error-link-text:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.error-link-text i {
    width: 20px;
    height: 20px;
}

/* Error Support Section */
.error-page-support {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.error-page-support p {
    font-size: 1.125rem;
    color: var(--text-gray);
}

.error-support-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.error-support-link:hover {
    border-bottom-color: var(--primary-color);
}

/* Error Page Mobile Responsive */
@media (max-width: 768px) {
    .error-page-number {
        font-size: 100px;
    }
    
    .error-page-title {
        font-size: 1.875rem;
    }
    
    .error-page-description {
        font-size: 1.125rem;
    }
    
    .error-link-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .error-page-number {
        font-size: 80px;
        gap: 0.25rem;
    }
    
    .error-page-title {
        font-size: 1.5rem;
    }
    
    .error-links-inline {
        flex-direction: column;
        gap: 1rem;
    }
}