/* Column alignment */
/* .wc-orders-list-table .column-nekorekten_column {
    text-align: center;
} */

/* Fetch report link */
.nekorekten-fetch-report {
    display: inline-block;
    position: relative;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Question mark button (initial state) */
.nekorekten-fetch-report:not(.nekorekten-has-data) {
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: #2271b1;
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
}
.nekorekten-fetch-report:not(.nekorekten-has-data):hover {
    background: #135e96;
    color: #fff;
    transform: scale(1.1);
}
.nekorekten-fetch-report:focus {
    outline: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1;
}

/* Thumb image */
.nekorekten-thumb {
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.nekorekten-fetch-report:hover .nekorekten-thumb {
    transform: scale(1.1);
}

/* Count badge */
.nekorekten-count {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    margin-left: 4px;
    background: #d63638;
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    vertical-align: middle;
}

/* Loading state */
.nekorekten-fetch-report.loading {
    opacity: 0.6;
    cursor: wait;
    animation: nekorekten-pulse 1.5s infinite;
}

@keyframes nekorekten-pulse {
    0%,
    100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
}

/* Error state */
/* .nekorekten-fetch-report.error {
    background: #d63638;
}

.nekorekten-fetch-report.error:hover {
    background: #b32d2e;
} */

/* No reports state (thumb up) */
/* .nekorekten-fetch-report.nekorekten-no-reports .nekorekten-thumb {
    opacity: 0.8;
} */

/* ==========================================================================
   Meta Box Styles
   ========================================================================== */

.nekorekten-meta-box {
    position: relative;
}

.nekorekten-meta-box .nekorekten-loading {
    padding: 20px;
    text-align: center;
}

.nekorekten-meta-box .nekorekten-loading .spinner {
    float: none;
    margin: 0 8px 0 0;
}

/* Report Summary */
.nekorekten-report-summary {
    margin: 0;
}

.nekorekten-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
    background: #f0f0f1;
}

.nekorekten-status-success {
    background: #d7f5e3;
    border-left: 4px solid #00a32a;
}

.nekorekten-status-warning {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
}

.nekorekten-status-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.nekorekten-status strong {
    margin: 0;
    font-size: 14px;
}

/* Reports List */
.nekorekten-reports-list {
    margin: 0 0 15px 0;
    max-height: 400px;
    overflow-y: auto;
}

.nekorekten-report-item {
    margin-bottom: 12px;
    padding: 10px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.nekorekten-report-item:last-child {
    margin-bottom: 0;
}

.nekorekten-report-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nekorekten-report-number {
    display: inline-block;
    padding: 2px 8px;
    background: #2271b1;
    color: #fff;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.nekorekten-report-date {
    font-size: 12px;
    color: #646970;
}

.nekorekten-report-content {
    font-size: 13px;
    line-height: 1.5;
}

/* Contact row (name, email, phone) */
.nekorekten-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f1;
}

.nekorekten-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f0f6fc;
    border-radius: 4px;
    font-size: 13px;
    color: #1e1e1e;
}

.nekorekten-contact-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #2271b1;
    flex-shrink: 0;
}

.nekorekten-report-field {
    margin-bottom: 8px;
}

.nekorekten-report-field:last-child {
    margin-bottom: 0;
}

/* Fields with icons */
.nekorekten-field-with-icon {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.nekorekten-field-with-icon > .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: #646970;
    flex-shrink: 0;
}

.nekorekten-field-content {
    flex: 1;
}

.nekorekten-field-content strong {
    display: block;
    margin-bottom: 3px;
    color: #50575e;
    font-size: 12px;
}

.nekorekten-field-content span {
    display: block;
}

.nekorekten-report-field.nekorekten-field-with-icon strong {
    display: block;
    margin-bottom: 3px;
    color: #50575e;
    font-size: 12px;
}

.nekorekten-report-field strong {
    display: block;
    margin-bottom: 3px;
    color: #50575e;
    font-size: 12px;
}

.nekorekten-report-field a {
    color: #2271b1;
    text-decoration: none;
}

.nekorekten-report-field a:hover {
    text-decoration: underline;
}

/* Reporter info */
.nekorekten-reporter-info {
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid #f0f0f1;
    font-size: 12px;
    color: #646970;
}

.nekorekten-reporter-info .dashicons {
    color: #50575e;
}

/* Report meta (views, likes, files) */
.nekorekten-report-meta {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f1;
    font-size: 12px;
    color: #646970;
}

.nekorekten-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nekorekten-meta-item .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Report files */
.nekorekten-report-files {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f1;
}

.nekorekten-report-files strong {
    display: block;
    margin-bottom: 10px;
    color: #50575e;
    font-size: 12px;
}

.nekorekten-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.nekorekten-file-item {
    display: flex;
    flex-direction: column;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.nekorekten-file-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nekorekten-file-thumbnail {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f1;
    overflow: hidden;
    position: relative;
}

.nekorekten-file-thumbnail.nekorekten-image-clickable {
    cursor: pointer;
}

.nekorekten-file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nekorekten-image-clickable:hover img {
    transform: scale(1.1);
}

.nekorekten-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nekorekten-image-clickable:hover .nekorekten-image-overlay {
    opacity: 1;
}

.nekorekten-image-overlay .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #fff;
}

.nekorekten-file-icon {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f7f7;
}

.nekorekten-file-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #a7aaad;
}

.nekorekten-file-info {
    padding: 8px;
    background: #fff;
}

.nekorekten-file-name {
    font-size: 12px;
    color: #1e1e1e;
    margin-bottom: 4px;
    word-break: break-word;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nekorekten-file-type {
    font-size: 11px;
    color: #969696;
    font-style: italic;
}

.nekorekten-report-files ul {
    margin: 0;
    padding-left: 20px;
}

.nekorekten-report-files li {
    margin-bottom: 4px;
    font-size: 12px;
    color: #646970;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nekorekten-report-files li .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.nekorekten-file-type {
    color: #969696;
    font-style: italic;
}

/* Actions */
.nekorekten-meta-box-actions {
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid #dcdcde;
    display: flex;
    gap: 8px;
}

.nekorekten-meta-box-actions .button {
    flex: 1;
    text-align: center;
}

.nekorekten-meta-box-actions .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
    vertical-align: middle;
    margin-right: 4px;
}

.nekorekten-meta-box-actions .button.loading {
    opacity: 0.6;
    cursor: wait;
}

/* ==========================================================================
   Image Lightbox
   ========================================================================== */

.nekorekten-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nekorekten-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.nekorekten-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nekorekten-lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    width: auto;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nekorekten-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.nekorekten-lightbox-close:hover {
    background: #fff;
}

.nekorekten-lightbox-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #1e1e1e;
}

.nekorekten-lightbox-title {
    margin-top: 15px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    color: #1e1e1e;
    font-size: 14px;
    max-width: 100%;
    word-break: break-word;
    text-align: center;
}

/* ==========================================================================
   Add Report Form
   ========================================================================== */

.nekorekten-add-report-form {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.nekorekten-add-report-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
    color: #1e1e1e;
    font-size: 16px;
}

.nekorekten-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.nekorekten-form-field {
    margin-bottom: 15px;
}

.nekorekten-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #1e1e1e;
    font-size: 13px;
}

.nekorekten-form-field .required {
    color: #d63638;
}

.nekorekten-form-field input[type="text"],
.nekorekten-form-field input[type="tel"],
.nekorekten-form-field input[type="email"],
.nekorekten-form-field input[type="url"],
.nekorekten-form-field textarea,
.nekorekten-form-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    background: #fff;
    box-shadow: 0 0 0 transparent;
    transition: border-color 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}

.nekorekten-form-field input[type="text"]:focus,
.nekorekten-form-field input[type="tel"]:focus,
.nekorekten-form-field input[type="email"]:focus,
.nekorekten-form-field input[type="url"]:focus,
.nekorekten-form-field textarea:focus,
.nekorekten-form-field select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

.nekorekten-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.nekorekten-form-field input[type="file"] {
    padding: 8px 0;
}

.nekorekten-form-field .description {
    margin: 5px 0 0 0;
    font-size: 12px;
    color: #646970;
    font-style: italic;
}

.nekorekten-form-field input[type="checkbox"] {
    margin-right: 5px;
    vertical-align: middle;
}

.nekorekten-form-field label:has(input[type="checkbox"]) {
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nekorekten-form-notice {
    padding: 12px;
    background: #d7f5e3;
    border-left: 4px solid #00a32a;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 13px;
    color: #1e1e1e;
}

.nekorekten-file-preview {
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 12px;
}

.nekorekten-file-preview ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
}

.nekorekten-file-preview li {
    margin-bottom: 4px;
    color: #646970;
}

.nekorekten-file-error {
    color: #d63638;
    font-weight: bold;
    padding: 8px 12px;
    background: #fcf0f1;
    border: 1px solid #f0b8bb;
    border-radius: 4px;
    margin-bottom: 10px;
}

.nekorekten-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dcdcde;
}

.nekorekten-form-actions .button {
    padding: 8px 15px;
}

.nekorekten-form-actions .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
    vertical-align: middle;
    margin-right: 4px;
}

.nekorekten-form-actions .button.loading {
    opacity: 0.6;
    cursor: wait;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .nekorekten-form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Legacy Styles (deprecated)
   ========================================================================== */
/* 
.woocommerce-orders-thumb-holder {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: #333;
    font-weight: bold;
    font-size: 20px;
} */
