/**
 * Deposet Admin Styles
 *
 * @package Deposet
 */

/* Settings Page */
.deposet-settings-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.deposet-settings-header h1 {
	margin: 0;
}

/* Category Rules */
.deposet-add-rule {
	background: #fff;
	padding: 20px;
	margin: 20px 0;
	border: 1px solid #ccd0d4;
	box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.deposet-add-rule h2 {
	margin-top: 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #ddd;
}

.deposet-rules-list {
	background: #fff;
	padding: 20px;
	margin: 20px 0;
	border: 1px solid #ccd0d4;
	box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.deposet-rules-list h2 {
	margin-top: 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #ddd;
}

/* Product Meta Box */
#deposet_product_data .options_group {
	padding: 15px;
}

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

/* Payment Plans Table */
.deposet-payment-plans-table {
	margin-top: 20px;
}

.deposet-payment-plans-table .widefat {
	border: 1px solid #ccd0d4;
}

.deposet-payment-plans-table th {
	background: #f9f9f9;
	font-weight: 600;
}

.deposet-payment-plans-table td {
	padding: 12px;
}

/* Status Badges */
.deposet-status {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.deposet-status.pending {
	background: #fff3cd;
	color: #856404;
}

.deposet-status.partial {
	background: #d1ecf1;
	color: #0c5460;
}

.deposet-status.complete {
	background: #d4edda;
	color: #155724;
}

.deposet-status.refunded {
	background: #f8d7da;
	color: #721c24;
}

/* Tooltips */
.deposet-tooltip {
	position: relative;
	display: inline-block;
	margin-left: 5px;
	cursor: help;
}

.deposet-tooltip .dashicons {
	color: #a0a5aa;
	font-size: 16px;
}

.deposet-tooltip:hover .dashicons {
	color: #2271b1;
}

/* Notices */
.deposet-notice {
	margin: 15px 0;
	padding: 12px;
	border-left: 4px solid;
}

.deposet-notice.info {
	border-color: #2271b1;
	background: #f0f6fc;
}

.deposet-notice.warning {
	border-color: #dba617;
	background: #fcf9e8;
}

.deposet-notice.error {
	border-color: #d63638;
	background: #fcf0f1;
}

/* Buttons */
.deposet-button-primary {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
	padding: 8px 16px;
	text-decoration: none;
	border-radius: 3px;
	display: inline-block;
	transition: all 0.2s;
}

.deposet-button-primary:hover {
	background: #135e96;
	border-color: #135e96;
	color: #fff;
}

/* Order Meta Box */
.deposet-order-meta {
	padding: 15px;
	background: #f9f9f9;
	border: 1px solid #ddd;
	margin: 15px 0;
}

.deposet-order-meta h4 {
	margin: 0 0 10px 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #ddd;
}

.deposet-order-meta-row {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
}

.deposet-order-meta-row:last-child {
	border-bottom: none;
}

.deposet-order-meta-label {
	font-weight: 600;
	color: #666;
}

.deposet-order-meta-value {
	color: #333;
	font-weight: 500;
}

/* Checkbox Group Fields */
.deposet-checkbox-group {
	margin-bottom: 15px;
}

.deposet-checkbox-container {
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	padding: 15px;
	max-height: 200px;
	overflow-y: auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 10px;
}

.deposet-checkbox-item {
	display: flex;
	align-items: center;
	padding: 8px 12px;
	border: 1px solid #e0e0e0;
	border-radius: 3px;
	background: #fafafa;
	transition: all 0.2s ease;
	cursor: pointer;
}

.deposet-checkbox-item:hover {
	background: #f0f6fc;
	border-color: #2271b1;
}

.deposet-checkbox-item input[type="checkbox"] {
	margin: 0 8px 0 0;
	transform: scale(1.1);
}

.deposet-checkbox-item input[type="checkbox"]:checked + .deposet-checkbox-label {
	color: #2271b1;
	font-weight: 600;
}

.deposet-checkbox-item:has(input[type="checkbox"]:checked) {
	background: #e7f3ff;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px rgba(34, 113, 177, 0.1);
}

.deposet-checkbox-label {
	font-size: 14px;
	color: #333;
	transition: color 0.2s ease;
}

.deposet-checkbox-group .description {
	margin-top: 8px;
	font-style: italic;
	color: #666;
}

.deposet-checkbox-group .description strong {
	color: #2271b1;
	font-weight: 600;
}

/* Responsive */
@media (max-width: 782px) {
	.deposet-settings-header {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.deposet-add-rule,
	.deposet-rules-list {
		padding: 15px;
	}
	
	.deposet-order-meta-row {
		flex-direction: column;
		gap: 5px;
	}
	
	.deposet-checkbox-container {
		grid-template-columns: 1fr;
		max-height: 300px;
	}
	
	.deposet-checkbox-item {
		padding: 10px 12px;
	}
}

/* Partial Payments List Table */
.deposet-payment-type-deposit {
	color: #2271b1;
	font-weight: 600;
}

.deposet-payment-type-remaining {
	color: #d63638;
	font-weight: 600;
}

/* Order status badges in list table */
.order-status {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	line-height: 1;
}

.order-status.status-pending {
	background: #fff3cd;
	color: #856404;
}

.order-status.status-processing {
	background: #cce5ff;
	color: #004085;
}

.order-status.status-completed {
	background: #d4edda;
	color: #155724;
}

.order-status.status-cancelled {
	background: #f8d7da;
	color: #721c24;
}

.order-status.status-refunded {
	background: #e2e3e5;
	color: #383d41;
}

/* Partial payment list table styling */
.wp-list-table .column-partial_payment {
	width: 25%;
}

.wp-list-table .column-parent_order {
	width: 15%;
}

.wp-list-table .column-date {
	width: 15%;
}

.wp-list-table .column-status {
	width: 15%;
}

.wp-list-table .column-total {
	width: 15%;
}

/* Sortable column headers */
.wp-list-table .sortable .sorting-indicators {
	display: inline-block;
	margin-left: 5px;
	opacity: 0.5;
}

.wp-list-table .sortable:hover .sorting-indicators {
	opacity: 1;
}

/* Bulk actions styling */
.bulk-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.bulk-actions select {
	min-width: 150px;
}

/* Search and filter styling */
.tablenav .alignleft.actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.tablenav .alignleft.actions select {
	margin-right: 10px;
}

/* Order view links */
.order-view {
	text-decoration: none;
	color: #2271b1;
	font-weight: 600;
}

.order-view:hover {
	color: #135e96;
	text-decoration: underline;
}

/* Responsive table */
@media (max-width: 782px) {
	.wp-list-table .column-partial_payment,
	.wp-list-table .column-parent_order,
	.wp-list-table .column-date,
	.wp-list-table .column-status,
	.wp-list-table .column-total {
		width: auto;
	}
	
	.tablenav .alignleft.actions {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.bulk-actions {
		flex-direction: column;
		align-items: flex-start;
	}
}


.post-type-deposet_payment .wp-list-table .order-preview,.woocommerce_page_wc-orders .wp-list-table .order-preview {
    float: right;
    width: 16px;
    padding: 20px 4px 4px 4px;
    height: 0;
    overflow: hidden;
    position: relative;
    border: 2px solid transparent;
    border-radius: 4px
}

.post-type-deposet_payment .wp-list-table .order-preview::before,.woocommerce_page_wc-orders .wp-list-table .order-preview::before {
    font-family: WooCommerce;
    speak: never;
    font-weight: 400;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    margin: 0;
    text-indent: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    content: "\e010";
    line-height: 16px;
    font-size: 14px;
    vertical-align: middle;
    top: 4px
}
.post-type-deposet_payment .order_date.small-screen-only,
.post-type-deposet_payment .order_status.small-screen-only{
	display: none;
}