/**
 * Company Frontend Styles
 *
 * @package PihlfeltB2B
 */

/* Dashboard */
.pb2b-company-dashboard {
    max-width: 800px;
}

.pb2b-company-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.pb2b-company-header h3 {
    margin: 0 0 5px 0;
}

.pb2b-org-number {
    color: #666;
    margin: 0;
}

/* Navigation */
.pb2b-company-nav {
    margin-bottom: 30px;
}

.pb2b-company-nav .button {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Company info */
.pb2b-company-info {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.pb2b-company-info h4 {
    margin-top: 0;
}

.pb2b-company-info address {
    font-style: normal;
    line-height: 1.6;
}

/* Recent orders */
.pb2b-recent-orders h4 {
    margin-bottom: 15px;
}

/* Orders page */
.pb2b-company-orders .pb2b-via {
    color: #666;
}

.pb2b-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.pb2b-page-info {
    color: #666;
}

/* Members page */
.pb2b-members-table .pb2b-current-user {
    background: #f0f7ff;
}

.pb2b-you {
    color: #0073aa;
    font-size: 0.9em;
}

.pb2b-remove {
    color: #a00 !important;
    border-color: #a00 !important;
}

.pb2b-remove:hover {
    background: #a00 !important;
    color: #fff !important;
}

.pb2b-no-actions {
    color: #999;
}

.pb2b-invite-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.pb2b-invite-section h4 {
    margin-top: 0;
}

.pb2b-invite-description {
    color: #666;
    margin: 0 0 15px 0;
}

.pb2b-invite-form {
    max-width: 400px;
}

.pb2b-invite-form input[type="email"] {
    width: 100%;
}

/* Pending invitations */
.pb2b-pending-invitations {
    margin-top: 30px;
    padding: 20px;
    background: #fff8e5;
    border-radius: 4px;
    border-left: 4px solid #ffb900;
}

.pb2b-pending-invitations h4 {
    margin-top: 0;
    color: #996b00;
}

.pb2b-status-pending {
    color: #996b00;
    font-style: italic;
    font-size: 0.9em;
}

/* Orderer column in orders list */
.pb2b-placed-by {
    color: #666;
    font-size: 0.9em;
}

.woocommerce-orders-table .pb2b-you {
    color: #0073aa;
    font-size: 0.85em;
}

/* Company form */
.pb2b-company-form .woocommerce-form-row {
    margin-bottom: 15px;
}

.pb2b-company-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Billing notice */
.pb2b-company-billing-notice {
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin-bottom: 20px;
}

.pb2b-company-billing-notice p {
    margin: 0 0 10px 0;
}

.pb2b-company-billing-notice p:last-child {
    margin-bottom: 0;
}

/* Read-only fields */
.pb2b-readonly input,
.pb2b-readonly select {
    background: #f5f5f5 !important;
    cursor: not-allowed;
}

/* Reorder button */
.woocommerce-button.reorder {
    margin-left: 5px;
}

/* Custom address toggle checkbox */
.pb2b-custom-address-toggle {
    margin-bottom: 20px !important;
    padding: 15px;
    background: #f0f7ff;
    border: 1px solid #c8dff5;
    border-radius: 4px;
}

.pb2b-custom-address-toggle label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.pb2b-custom-address-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

/* Reference field at checkout */
.pb2b-reference-field {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

.pb2b-reference-field label {
    font-weight: 600;
}

/* Order reference display */
.pb2b-order-reference {
    margin: 15px 0;
    padding: 10px 15px;
    background: #f8f9fa;
    border-left: 3px solid #0073aa;
}

.pb2b-admin-reference {
    background: #e7f3ff;
    padding: 10px;
    margin-top: 10px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .pb2b-company-nav .button {
        display: block;
        text-align: center;
        margin-right: 0;
    }

    .pb2b-pagination {
        flex-direction: column;
        gap: 10px;
    }

    .pb2b-members-table .button {
        display: block;
        margin-bottom: 5px;
    }
}
