/**
 * WooCRM Connect - Customer Account Styles
 *
 * Styles for "Deine Post" document dashboard
 *
 * @package WooCRMConnect
 * @since 1.0.0
 */

/* CSS Variables - Override these with the 'woocrm_connect_css_variables' filter */
:root {
    --woocrm-primary: #0071a1;
    --woocrm-primary-hover: #005a87;
    --woocrm-primary-dark: #004666;

    --woocrm-success: #28a745;
    --woocrm-success-bg: #f8fff9;

    --woocrm-warning: #ff9800;
    --woocrm-warning-bg: #fff9f0;

    --woocrm-danger: #dc3545;
    --woocrm-danger-hover: #c82333;
    --woocrm-danger-bg: #fff5f5;

    --woocrm-background: #fff;
    --woocrm-background-alt: #f9f9f9;

    --woocrm-border: #ddd;
    --woocrm-border-light: #eee;

    --woocrm-text: #333;
    --woocrm-text-muted: #666;
    --woocrm-text-light: #999;

    --woocrm-info-bg: #e7f3ff;
    --woocrm-info-border: #b3d9ff;
    --woocrm-info-text: #004085;

    /* Message Colors */
    --woocrm-error-bg: #f8d7da;
    --woocrm-error-border: #f5c6cb;
    --woocrm-error-text: #721c24;

    --woocrm-success-text: #155724;
    --woocrm-success-border: #c3e6cb;

    --woocrm-warning-text: #856404;

    --woocrm-info-message-bg: #d1ecf1;
    --woocrm-info-message-border: #bee5eb;
    --woocrm-info-message-text: #0c5460;
}

/* Main Container */
.woocrm-deine-post {
    margin: 20px 0;
}

.woocrm-deine-post h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--woocrm-text);
}

/* Legend Container */
.woocrm-legends-container {
    margin: 20px 0 15px 0;
}

/* Legend */
.woocrm-legend-wrapper {
    margin-bottom: 10px;
}

.woocrm-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.woocrm-legend-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--woocrm-text);
    margin-right: 5px;
}

.woocrm-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.woocrm-status-badge.status-green {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.woocrm-status-badge.status-orange {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.woocrm-status-badge.status-red {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Icon Legend */
.woocrm-icon-legend {
    font-size: 13px;
}

.woocrm-icon-item {
    display: inline-block;
    padding: 4px 8px;
    background-color: #f6f7f7;
    border-radius: 3px;
    color: var(--woocrm-text);
}

.woocrm-icon-divider {
    color: #c3c4c7;
    font-weight: 300;
    margin: 0 4px;
}

/* Table Layout */
.deine-post-table-wrapper {
    margin-bottom: 30px;
    overflow-x: auto;
}

.deine-post-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--woocrm-background);
    border: 1px solid var(--woocrm-border);
    border-radius: 8px;
    overflow: hidden;
}

.deine-post-table thead {
    background: var(--woocrm-background-alt);
    border-bottom: 2px solid var(--woocrm-border);
}

.deine-post-table thead th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--woocrm-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deine-post-table tbody tr {
    border-bottom: 1px solid var(--woocrm-border-light);
    transition: background-color 0.2s ease;
}

.deine-post-table tbody tr:last-child {
    border-bottom: none;
}

.deine-post-table tbody tr:hover {
    background: var(--woocrm-background-alt);
}

.deine-post-table tbody td {
    padding: 15px 20px;
    color: var(--woocrm-text);
    font-size: 14px;
    vertical-align: middle;
}

.deine-post-table tbody td.actions {
    white-space: nowrap;
}

.deine-post-table tbody td.actions .button {
    margin-right: 5px;
    margin-bottom: 5px;
}

.deine-post-table tbody td.actions .button:last-child {
    margin-right: 0;
}

/* Countdown Timer */
.woocrm-countdown {
    display: inline-block;
    padding: 8px 12px;
    background: var(--woocrm-info-bg);
    border: 1px solid var(--woocrm-info-border);
    border-radius: 4px;
    color: var(--woocrm-info-text);
    font-weight: 600;
    margin-top: 10px;
}

.woocrm-countdown.woocrm-expired {
    background: var(--woocrm-warning-bg);
    border: 1px solid var(--woocrm-warning);
    color: var(--woocrm-warning-text);
}

/* Action Buttons */
.deine-post-table .button,
.woocrm-action-btn {
    display: inline-block;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--woocrm-primary);
    color: #fff !important;
    border: 1px solid var(--woocrm-primary-hover);
    text-align: center;
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
    position: relative; /* Required for tooltips */
}

.deine-post-table .button:hover:not(:disabled),
.woocrm-action-btn:hover:not(:disabled) {
    background: var(--woocrm-primary-hover);
    border-color: var(--woocrm-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.deine-post-table .button:active:not(:disabled),
.woocrm-action-btn:active:not(:disabled) {
    transform: translateY(0);
}

.deine-post-table .button:disabled,
.woocrm-action-btn:disabled {
    background: var(--woocrm-border);
    border-color: var(--woocrm-text-light);
    color: var(--woocrm-text-muted) !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.deine-post-table .delete-btn,
.woocrm-delete-btn {
    background: var(--woocrm-danger);
    border-color: var(--woocrm-danger-hover);
}

.deine-post-table .delete-btn:hover:not(:disabled),
.woocrm-delete-btn:hover:not(:disabled) {
    background: var(--woocrm-danger-hover);
    border-color: #bd2130;
}

.deine-post-table .request-destroy-btn {
    background: #f0c33c;
    border-color: #dba617;
    color: #333 !important;
}

.deine-post-table .request-destroy-btn:hover:not(:disabled) {
    background: #dba617;
    border-color: #c89615;
}

.deine-post-table .small-btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* Notification Status Messages */
.notification-status {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    font-size: 13px;
    border-radius: 3px;
    font-weight: 600;
}

.notification-status.status-requested {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notification-status.status-destroy {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Price Display */
.deine-post-table .price,
.woocrm-price {
    font-weight: 400;
    font-size: 12px;
    opacity: 0.9;
}

/* Change Log Section */
.woocrm-change-log {
    margin-top: 40px;
    padding: 20px;
    background: var(--woocrm-background-alt);
    border: 1px solid var(--woocrm-border);
    border-radius: 8px;
}

.woocrm-change-log h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--woocrm-text);
}

.woocrm-change-log p {
    color: var(--woocrm-text-muted);
    font-size: 14px;
}

/* Preference Log List */
.woocrm-preference-log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.woocrm-log-entry {
    padding: 12px 15px;
    background: var(--woocrm-background);
    border: 1px solid var(--woocrm-border-light);
    border-radius: 4px;
    font-size: 14px;
    color: var(--woocrm-text);
    line-height: 1.5;
}

.woocrm-log-entry .log-date {
    display: inline-block;
    font-weight: 600;
    color: var(--woocrm-text-muted);
    margin-right: 5px;
}

.woocrm-log-entry .log-old-value {
    color: var(--woocrm-danger);
    font-weight: 500;
    text-decoration: line-through;
}

.woocrm-log-entry .log-new-value {
    color: var(--woocrm-success);
    font-weight: 600;
}

.woocrm-no-changes {
    padding: 15px;
    background: var(--woocrm-background);
    border: 1px solid var(--woocrm-border-light);
    border-radius: 4px;
    color: var(--woocrm-text-muted);
    font-size: 14px;
    text-align: center;
    font-style: italic;
}

/* Loading Spinner */
.woocrm-loading {
    text-align: center;
    padding: 40px 20px;
}

.woocrm-loading .spinner {
    float: none;
    margin: 0 auto 20px;
    display: block;
}

/* Error Messages */
.woocrm-error {
    background: var(--woocrm-error-bg);
    border: 1px solid var(--woocrm-error-border);
    color: var(--woocrm-error-text);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Success Messages */
.woocrm-success {
    background: var(--woocrm-success-bg);
    border: 1px solid var(--woocrm-success-border);
    color: var(--woocrm-success-text);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Info Messages */
.woocrm-info {
    background: var(--woocrm-info-message-bg);
    border: 1px solid var(--woocrm-info-message-border);
    color: var(--woocrm-info-message-text);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Empty State */
.woocommerce-message {
    background: var(--woocrm-info-bg);
    border-left: 4px solid var(--woocrm-primary);
    padding: 15px 20px;
    margin: 20px 0;
    color: var(--woocrm-info-text);
}

.deine-post-empty-state {
    text-align: center;
    padding: 60px 30px;
    background-color: var(--woocrm-background-alt);
    border: 2px dashed var(--woocrm-border);
    border-radius: 8px;
    margin: 30px 0;
}

.deine-post-empty-state .empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    line-height: 1;
}

.deine-post-empty-state h3 {
    color: var(--woocrm-text);
    font-size: 24px;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.deine-post-empty-state p {
    color: var(--woocrm-text-muted);
    font-size: 16px;
    line-height: 1.6;
    margin: 0 auto 10px;
    max-width: 600px;
}

.deine-post-empty-state .empty-note {
    color: var(--woocrm-text-light);
    font-size: 14px;
    font-style: italic;
    margin-top: 20px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    /* Table responsive */
    .deine-post-table thead {
        display: none;
    }

    .deine-post-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid var(--woocrm-border);
        border-radius: 8px;
        background: var(--woocrm-background);
    }

    .deine-post-table tbody td {
        display: block;
        padding: 10px 15px;
        text-align: left;
        border-bottom: 1px solid var(--woocrm-border-light);
    }

    .deine-post-table tbody td:last-child {
        border-bottom: none;
    }

    .deine-post-table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 5px;
        color: var(--woocrm-text-muted);
        font-size: 12px;
        text-transform: uppercase;
    }

    .deine-post-table tbody td.actions {
        white-space: normal;
    }

    .deine-post-table tbody td.actions .button {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
    }

    .deine-post-table tbody td.actions .button:last-child {
        margin-bottom: 0;
    }

    .woocrm-deine-post h2 {
        font-size: 20px;
    }

    .deine-post-empty-state {
        padding: 40px 20px;
    }

    .deine-post-empty-state .empty-icon {
        font-size: 60px;
    }

    .deine-post-empty-state h3 {
        font-size: 20px;
    }

    .deine-post-empty-state p {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .deine-post-table tbody td {
        padding: 8px 12px;
    }

    .deine-post-table tbody td.actions .button {
        padding: 10px;
        font-size: 13px;
    }

    .woocrm-countdown {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Preferences Section */
.woocrm-preferences-section {
    margin: 20px 0 30px 0;
    border: 1px solid var(--woocrm-border);
    border-radius: 8px;
    overflow: hidden;
}

.woocrm-preferences-toggle {
    width: 100%;
    padding: 15px 20px;
    background: var(--woocrm-background-alt);
    border: none;
    border-bottom: 1px solid var(--woocrm-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--woocrm-text);
    transition: background 0.2s ease;
}

.woocrm-preferences-toggle:hover {
    background: #e8e8e8;
}

.woocrm-preferences-toggle .toggle-icon {
    transition: transform 0.2s ease;
    font-size: 12px;
}

.woocrm-preferences-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.woocrm-preferences-content {
    padding: 20px;
    background: var(--woocrm-background);
}

.woocrm-preferences-form .preference-section {
    margin-bottom: 25px;
}

.woocrm-preferences-form .preference-section h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--woocrm-text);
}

.woocrm-preferences-form .preference-description {
    color: var(--woocrm-text-muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.woocrm-preferences-form .preference-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.woocrm-preferences-form .preference-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--woocrm-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.woocrm-preferences-form .preference-options label:hover {
    background: var(--woocrm-background-alt);
    border-color: var(--woocrm-primary);
}

.woocrm-preferences-form .preference-options input[type="radio"] {
    margin: 0;
}

.woocrm-preferences-form .preference-options span {
    font-size: 14px;
    color: var(--woocrm-text);
}

.woocrm-preferences-form button[type="submit"] {
    background: var(--woocrm-primary);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.woocrm-preferences-form button[type="submit"]:hover {
    background: var(--woocrm-primary-hover);
}

/* Preference Info Section */
.woocrm-preferences-form .preference-info-section {
    background: var(--woocrm-info-bg);
    border: 1px solid var(--woocrm-border);
    border-radius: 8px;
    padding: 15px 20px;
}

.woocrm-preferences-form .preference-info-text {
    color: var(--woocrm-text-muted);
    font-size: 14px;
    line-height: 1.7;
}

/* Postal Address Section */
.woocrm-preferences-form .preference-address-section {
    background: var(--woocrm-background);
    border: 1px solid var(--woocrm-border);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.woocrm-preferences-form .preference-address-section h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--woocrm-text);
}

.woocrm-preferences-form .preference-address-note {
    color: var(--woocrm-text-muted);
    font-size: 13px;
    font-style: italic;
    margin: 0 0 15px 0;
    padding: 10px;
    background: var(--woocrm-info-bg);
    border-radius: 4px;
}

.woocrm-preferences-form .preference-address-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.woocrm-preferences-form .address-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.woocrm-preferences-form .address-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--woocrm-text);
}

.woocrm-preferences-form .address-field input[type="text"] {
    padding: 10px 12px;
    border: 1px solid var(--woocrm-border);
    border-radius: 4px;
    font-size: 14px;
    color: var(--woocrm-text);
    background: #fff;
    transition: border-color 0.2s ease;
}

.woocrm-preferences-form .address-field input[type="text"]:focus {
    outline: none;
    border-color: var(--woocrm-primary);
}

.woocrm-preferences-form .address-field input[type="text"]::placeholder {
    color: var(--woocrm-text-muted);
}

/* Animation for new documents */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.woocrm-document {
    animation: slideIn 0.3s ease-out;
}

/* Tooltip Styles (if tooltips enabled) */
.deine-post-table .button[title]:not([title=""]):hover::after,
.woocrm-action-btn[title]:not([title=""]):hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease-out;
}

/* Tooltip arrow */
.deine-post-table .button[title]:not([title=""]):hover::before,
.woocrm-action-btn[title]:not([title=""]):hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1001;
    pointer-events: none;
}

.deine-post-table .button[title]:disabled:hover::after,
.woocrm-action-btn[title]:disabled:hover::after {
    display: block;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        bottom: calc(100% + 2px);
    }
    to {
        opacity: 1;
        bottom: calc(100% + 5px);
    }
}

/* Loading state for buttons */
.woocrm-action-btn.loading {
    position: relative;
    color: transparent;
}

.woocrm-action-btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* ========================================
   Expandable Row Styles
   ======================================== */

/* Hide checkbox toggle */
.row-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Group documents with expandable details */
.doc-row-group {
    border-bottom: 1px solid var(--woocrm-border-light);
}

.doc-row-group:last-of-type {
    border-bottom: none;
}

/* Main Row (Compact View) */
.doc-main-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.doc-main-row:hover {
    background: var(--woocrm-background-alt);
}

/* Expand button cell */
.expand-cell {
    width: 30px;
    padding: 15px 10px !important;
    text-align: center;
    vertical-align: middle;
}

/* Expand button */
.expand-btn {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--woocrm-primary);
    color: white;
    border-radius: 3px;
    cursor: pointer;
    text-align: center;
    line-height: 24px;
    transition: all 0.2s ease;
    user-select: none;
}

.expand-btn:hover {
    background-color: var(--woocrm-primary-hover);
    transform: scale(1.1);
}

/* Expand icon */
.expand-icon {
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.2s ease;
    display: inline-block;
}

/* When checked, rotate icon and change color */
.row-toggle:checked + .expand-btn .expand-icon {
    transform: rotate(45deg);
}

.row-toggle:checked + .expand-btn {
    background-color: var(--woocrm-danger);
}

.row-toggle:checked + .expand-btn:hover {
    background-color: var(--woocrm-danger-hover);
}

/* Sender column - bold and larger */
.doc-main-row .sender-cell {
    font-weight: 600;
    font-size: 15px;
    color: var(--woocrm-text);
}

/* Date column - subtle */
.doc-main-row .date-cell {
    color: var(--woocrm-text-muted);
    font-size: 14px;
}

/* Status column - icons and badges */
.doc-main-row .status-cell {
    white-space: nowrap;
}

.doc-icon {
    font-size: 1.4rem;
    margin-right: 4px;
}

/* Document type and status icons in table */
.doc-type-icon {
    font-size: 1.4rem;
    vertical-align: middle;
}

.status-icon {
    font-size: 1.3rem;
    vertical-align: middle;
}

.download-badge {
    display: inline-block;
    padding: 2px 6px;
    background: var(--woocrm-info-bg);
    color: var(--woocrm-info-text);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

/* Hide details row by default */
.doc-details-row {
    display: none;
}

/* Show details row when checkbox is checked */
tbody:has(.row-toggle:checked) .doc-details-row {
    display: table-row;
}

/* Details content styling */
.details-content {
    padding: 20px;
    background-color: var(--woocrm-background-alt);
    border-left: 3px solid var(--woocrm-primary);
    border-top: 1px solid var(--woocrm-border);
}

/* Details sections */
.details-section {
    margin-bottom: 20px;
}

.details-section:last-child {
    margin-bottom: 0;
}

.details-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--woocrm-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--woocrm-primary);
    padding-bottom: 6px;
}

/* Detail grid layout */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item label {
    font-weight: 600;
    font-size: 11px;
    color: var(--woocrm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    font-size: 14px;
    color: var(--woocrm-text);
}

.detail-item code {
    background: #f0f0f0;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 12px;
    word-break: break-all;
    color: var(--woocrm-text);
}

.detail-item .detail-value-muted {
    color: var(--woocrm-text-muted);
}

/* Billing section */
.billing-section {
    background: var(--woocrm-info-bg);
    border: 1px solid var(--woocrm-info-border);
    border-radius: 4px;
    padding: 15px;
}

.billing-section h4 {
    border-color: var(--woocrm-info-border);
}

.billing-placeholder {
    color: var(--woocrm-info-text);
    font-size: 13px;
    margin: 0;
}

.billing-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.billing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: var(--woocrm-background);
    border-radius: 3px;
    font-size: 14px;
}

.billing-item-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--woocrm-text);
}

.billing-item-price {
    font-weight: 600;
    color: var(--woocrm-text);
}

.billing-item-included {
    color: var(--woocrm-success);
    font-weight: 600;
}

.billing-item-note {
    font-size: 12px;
    color: var(--woocrm-text-muted);
    font-style: italic;
    margin-left: 28px;
}

/* Actions section */
.actions-section {
    background: var(--woocrm-background);
    border: 1px solid var(--woocrm-border);
    border-radius: 4px;
    padding: 15px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-buttons .button,
.action-buttons .woocrm-action-btn {
    margin: 0;
}

/* Responsive adjustments for expandable rows */
@media screen and (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .details-content {
        padding: 15px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .button,
    .action-buttons .woocrm-action-btn {
        width: 100%;
    }

    .billing-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .billing-item-note {
        margin-left: 0;
    }

    /* Make expand button more touch-friendly */
    .expand-btn {
        width: 32px;
        height: 32px;
        line-height: 32px;
    }

    .expand-cell {
        width: 40px;
        padding: 10px 5px !important;
    }
}

@media screen and (max-width: 480px) {
    .details-section h4 {
        font-size: 13px;
    }

    .detail-item label {
        font-size: 10px;
    }

    .detail-item span {
        font-size: 13px;
    }

    .billing-item {
        padding: 6px;
        font-size: 13px;
    }
}

/* ========================================
   Custom Endpoint Styles
   ======================================== */

/* Custom endpoint container */
.woocrm-custom-endpoint {
    margin: 20px 0;
}

.woocrm-custom-endpoint h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--woocrm-text);
}

.woocrm-endpoint-content {
    line-height: 1.7;
}

.woocrm-endpoint-content p {
    margin-bottom: 15px;
}

/* Impressum Address Styles */
.impressumdiv {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid var(--woocrm-primary);
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.impressumdiv p {
    margin: 0 0 10px 0;
    color: var(--woocrm-text);
}

.impressumdiv .bigtext {
    font-size: 24px;
    font-weight: 700;
    color: var(--woocrm-primary-dark);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--woocrm-primary);
    padding-bottom: 10px;
}

.impressumdiv a {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 24px;
    background: var(--woocrm-primary);
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.impressumdiv a:hover {
    background: var(--woocrm-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 113, 161, 0.3);
}

/* Login History Styles */
.woocrm-endpoint-log-history .woocrm-endpoint-content {
    background: var(--woocrm-info-bg);
    border: 1px solid var(--woocrm-info-border);
    border-radius: 8px;
    padding: 20px;
}

.woocrm-endpoint-log-history .woocrm-endpoint-content strong {
    color: var(--woocrm-primary);
}

/* Responsive for custom endpoints */
@media screen and (max-width: 768px) {
    .impressumdiv {
        padding: 20px;
    }

    .impressumdiv .bigtext {
        font-size: 20px;
    }

    .woocrm-custom-endpoint h2 {
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .impressumdiv {
        padding: 15px;
    }

    .impressumdiv .bigtext {
        font-size: 18px;
    }

    .impressumdiv a {
        display: block;
        text-align: center;
        font-size: 16px !important;
    }
}
