/* ========================================
   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;
    }
}

/* ========================================
   Company Payment Box Styles
   Prefix: company-payment-
   Description: Payment box styles for company details page
   ======================================== */

.company-payment-box {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    transition: all 0.3s ease;
    position: relative;
}

.company-payment-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 16, 32, 0.2);
}

.company-payment-box.featured {
    border-color: #111827;
    box-shadow: 0 10px 25px -8px rgba(0, 16, 32, 0.15);
}

.company-payment-box.featured:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgba(0, 16, 32, 0.25);
}

.payment-label {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #111827;
    padding: 4px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
}

.company-payment-box.featured .payment-label {
    background: #111827;
    color: white;
    border-color: #111827;
}

.company-payment-box h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5rem 0 1rem;
    text-align: center;
    color: #111827;
}

.campaign-price-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 1rem 0;
}

/* Example Report Button */
.example-report-button {
    margin: 1.5rem 0 1rem 0;
}

.example-report-button a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.example-report-button a:hover {
    background: white;
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.example-mini-image {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.example-report-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.example-title {
    font-weight: 600;
    color: #111827;
    font-size: 1rem;
}

.example-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
}

.example-arrow {
    color: #9ca3af;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.example-report-button a:hover .example-arrow {
    color: #111827;
    transform: translateX(3px);
}

.original-price {
    color: #9ca3af;
    text-decoration: line-through;
    font-size: 1.5rem;
    font-weight: 500;
}

.campaign-price {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.campaign-price .price-amount {
    color: #ef4444;
    font-weight: 700;
    font-size: 3rem;
    line-height: 1;
}

.campaign-price .price-currency {
    color: #ef4444;
    font-weight: 600;
    font-size: 1.25rem;
}

.campaign-badge {
    background: #ef4444;
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-description {
    text-align: center;
    color: #6b7280;
    font-size: 1rem;
    margin: 1rem 0 1.5rem;
}

.payment-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.payment-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #4b5563;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.payment-features li svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #10b981;
}

.company-payment-box .btn-primary {
    width: 100%;
    max-width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 1.5rem;
    transition: all 0.2s ease;
    background: #111827;
    color: white;
    border: none;
    cursor: pointer;
    word-wrap: break-word;
    white-space: normal;
}

.company-payment-box .btn-primary:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.company-payment-box small {
    display: block;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Success variant styling (regular payment box) */
.company-payment-box.featured:not(.high-risk) {
    border-color: #10b981;
    background: linear-gradient(to bottom, #f0fdf4, #ffffff);
}

.company-payment-box.featured:not(.high-risk) .payment-label {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* High risk variant styling */
.company-payment-box.high-risk {
    border-color: #fbbf24;
    background: linear-gradient(to bottom, #fffbeb, #ffffff);
}

.company-payment-box.high-risk .payment-label {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

/* Tax Registration Table Styles */
.tax-registration-table .tax-registration-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 24px;
}

.tax-registration-table .tax-text {
    flex: 1;
    color: #1a1a1a;
    font-size: 16px;
    line-height: 24px;
    display: flex;
    align-items: center;
}

.tax-registration-table .tax-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
}

.tax-registration-table .tax-status svg {
    display: block;
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
}

.tax-registration-table .tax-status-yes {
    background-color: #f0fdf4;
    color: #16a34a;
}

.tax-registration-table .tax-status-no {
    background-color: #fef2f2;
    color: #dc2626;
}

/* Mobile styles for tax registration table */
@media (max-width: 768px) {
    .tax-registration-table td {
        padding: 16px !important;
        border-bottom: none !important;
    }
    
    .tax-registration-table tbody tr {
        border-bottom: none !important;
    }
    
    .tax-registration-table tbody tr:last-child td {
        border-bottom: none !important;
    }
    
    .tax-registration-table .tax-registration-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .tax-registration-table .tax-text {
        font-size: 15px;
        padding-right: 12px;
    }
    
    .tax-registration-table .tax-status {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px;
        min-height: 24px;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .tax-registration-table .tax-status svg {
        width: 16px !important;
        height: 16px !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .company-payment-box {
        padding: 1.5rem;
        width: 100% !important;
        max-width: 100% !important;
        margin: 1.5rem 0;
        box-sizing: border-box;
    }

    .campaign-price .price-amount {
        font-size: 2.5rem;
    }

    .original-price {
        font-size: 1.25rem;
    }
}