/* 
    WPC Recurring Orders - Premium Theme Styles 
*/

.wpcro-hidden {
    display: none !important;
}

.wpcro-recurring-option-wrapper {
    position: relative;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #fff;
    transition: background-color 0.2s, border-color 0.2s;
}

.wpcro-wrapper-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #cbd5e1;
    pointer-events: none;
    opacity: 0.4;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpcro-selected .wpcro-wrapper-icon {
    color: #10b981;
    opacity: 1;
    transform: rotate(180deg);
}

.wpcro-recurring-option-wrapper.wpcro-selected {
    border-color: #10b981;
    background-color: #f8fafc;
}

.wpcro-master-label {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
    color: #2c3e50;
    line-height: 1.4;
}

.wpcro-master-label-text {
    display: block;
    flex: 1;
}

.wpcro-intervals-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    display: none;
    align-items: center;
    gap: 12px;
}

.wpcro-selected .wpcro-intervals-container {
    display: flex;
}

/* Custom Checkbox/Radio common resets */
.wpcro-master-label input,
.wpcro-recurring-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Master Checkbox */
.wpcro-checkmark {
    position: relative;
    display: block;
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.wpcro-master-label:hover input~.wpcro-checkmark {
    border-color: #10b981;
}

.wpcro-master-label input:checked~.wpcro-checkmark {
    background-color: #10b981;
    border-color: #10b981;
}

.wpcro-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.wpcro-master-label input:checked~.wpcro-checkmark:after {
    display: block;
}

/* Radio Options (Intervals) */
.wpcro-recurring-option {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px;
    cursor: pointer;
    padding: 10px 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid transparent;
    	transition: all 0.2s;
}

.wpcro-action-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wpcro-skipped-notice,
.wpcro-resumed-notice {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.wpcro-skipped-notice {
    background: #fff8e1;
    color: #b45309;
    border: 1px solid #fde68a;
}

.wpcro-resumed-notice {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* Recurring Order Status Coloring */
mark.order-status {
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-weight: 400 !important;
    display: inline-block;
    line-height: 1.5;
}

mark.order-status.status-completed {
    background-color: #ecfdf5 !important;
    color: #047857 !important;
}

mark.order-status.status-paused {
    background-color: #fff7ed !important;
    color: #c2410c !important;
}

mark.order-status.status-skipped {
    background-color: #fffbeb !important;
    color: #b45309 !important;
}

mark.order-status.status-cancelled {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
}

.wpcro-option-text {
    display: block;
    flex: 1;
}

.wpcro-recurring-option:hover {
    background: #f1f5f9;
}



.wpcro-recurring-option.wpcro-radio-selected {
    background: #f1f5f9;
    border-color: #10b981;
}

.wpcro_frequency_label {
    margin-left: 10px;
    color: #777;
    font-style: italic;
}

.wpcro-recurring-label {
    font-weight: bold;
    white-space: nowrap;
}

.wpcro-intervals {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wpcro-radio-checkmark {
    position: relative;
    display: block;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.wpcro-recurring-option input:checked~.wpcro-radio-checkmark {
    background-color: #10b981;
}

.wpcro-radio-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.wpcro-recurring-option input:checked~.wpcro-radio-checkmark:after {
    display: block;
}

/* Custom Select Dropdown */
.wpcro-custom-select {
    position: relative;
    flex: 1;
}

.wpcro-select-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.wpcro-select-selected:hover {
    border-color: #cbd5e1;
}

.wpcro-select-arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.3s;
    margin-bottom: 4px;
}

.wpcro-custom-select.wpcro-open .wpcro-select-arrow {
    transform: rotate(-135deg);
    margin-bottom: -4px;
}

.wpcro-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: none;
    max-height: 250px;
    overflow-y: auto;
}

.wpcro-select-option {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.wpcro-select-option:hover {
    background: #f8fafc;
    color: #10b981;
}

.wpcro-select-option.wpcro-active {
    background: #f1f5f9;
    color: #10b981;
    font-weight: 600;
}


/* Pay Page Addresses */
.wpcro-customer-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.wpcro-renewal-note {
    margin-top: 20px;
    padding: 15px 20px;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    color: #6b7280;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpcro-renewal-note span {
    opacity: 0.8;
}

.wpcro-renewal-note strong {
    color: #374151;
}

@media (max-width: 768px) {
    .wpcro-customer-details {
        grid-template-columns: 1fr;
    }
}

/* Account Table Styling */
.account-orders-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.account-orders-table tbody tr:hover {
    background-color: #f1f5f9;
}

/* Timeline Modal */
.wpcro-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
}

.wpcro-modal.wpcro-visible {
    display: flex;
}

.wpcro-modal-content {
    background-color: #fff;
    border-radius: 16px;
    width: 95%;
    max-width: 650px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.wpcro-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #94a3b8;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

#wpcro-timeline-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.wpcro-timeline-header-sticky {
    padding: 35px 30px 5px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.wpcro-timeline-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

/* Timeline UI */
.wpcro-timeline {
    position: relative;
    padding-left: 30px;
}

.wpcro-timeline:before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.wpcro-timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.wpcro-timeline-item:last-child {
    margin-bottom: 0;
}

.wpcro-timeline-marker {
    position: absolute;
    left: -30px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #e2e8f0;
    z-index: 2;
}

.wpcro-marker-leaf {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.wpcro-timeline-content {
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
}

.wpcro-timeline-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
}

.wpcro-timeline-num {
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
}

.wpcro-timeline-status {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    background: #e2e8f0;
}

.wpcro-timeline-date {
    font-size: 13px;
    color: #64748b;
}

.wpcro-chain-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 3px;
}

.wpcro-root-label {
    background: #fee2e2;
    color: #ef4444;
}

.wpcro-leaf-label {
    background: #dcfce7;
    color: #10b981;
}

.wpcro-loading {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

/* ================================================================
   WPC Recurring Orders – Account & Timeline (Additional)
   ================================================================ */

/* Recurring items list in account table */
.wpcro-item-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wpcro-item-list li {
    margin-bottom: 4px;
    line-height: 1.2;
}

/* Next delivery text */
.wpcro-next-delivery {
    font-size: 11px;
    margin-top: 5px;
    color: #10b981 !important;
    font-weight: 400;
    line-height: 1.2;
}

/* Table buttons */
.woocommerce-orders-table__cell .button.pay {
    margin-bottom: 5px;
    display: block;
    text-align: center;
    white-space: nowrap;
}

.wpcro-timeline-btn {
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

/* Timeline Modal Header & Actions */
.wpcro-timeline-header-sticky h2 {
    margin-bottom: 20px;
    text-align: center;
}

.wpcro-timeline-cancel-top {
    text-align: center;
    margin-bottom: 25px;
}

.wpcro-member-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.wpcro-member-actions .button.wpcro-action-btn {
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

.wpcro-action-btn[data-action="resume"] {
    background-color: #10b981 !important;
    color: #fff !important;
}

.wpcro-action-btn[data-action="pause"] {
    background-color: #f59e0b !important;
    color: #fff !important;
}

.wpcro-timeline-modal-header {
    padding: 25px 30px;
}

.wpcro-timeline-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
    font-weight: 700;
}

.wpcro-timeline-scroll-area {
    padding: 20px 30px 40px;
}

.wpcro-timeline-main-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.wpcro-timeline-item-content {
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wpcro-item-latest .wpcro-timeline-item-content {
    background: #fff;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.wpcro-timeline-actions-wrapper {
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wpcro-member-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wpcro-timeline-footer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpcro-cancel-link {
    color: #ef4444;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.wpcro-cancel-link:hover {
    color: #b91c1c;
    text-decoration: underline;
}

.wpcro-action-hint {
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
}

/* Timeline Item Layout Overrides */
.wpcro-timeline-item-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.wpcro-timeline-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ================================================================
   WPC Recurring Orders – Cancellation Confirmation Page
   ================================================================ */
.wpcro-cancel-page-wrapper {
    width: 90%;
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
    text-align: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    font-family: sans-serif;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.wpcro-cancel-icon {
    color: #e74c3c;
    font-size: 48px;
    margin-bottom: 20px;
}

.wpcro-cancel-icon.success {
    color: #10b981;
}

.wpcro-cancel-title {
    margin-top: 0;
}

.wpcro-cancel-desc {
    color: #666;
    margin-bottom: 30px;
}

.wpcro-cancel-button-home {
    text-decoration: none;
    background: #2563eb;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

.wpcro-cancel-button-confirm {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
}

.wpcro-confirm-btn {
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wpcro-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
}

.wpcro-btn-cancel {
    background-color: #e74c3c;
}

.wpcro-btn-pause {
    background-color: #f39c12;
}

.wpcro-btn-skip {
    background-color: #3498db;
}

.wpcro-cancel-button-keep {
    margin-left: 20px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    vertical-align: middle;
}

.order-status.status-paused {
    background: #fef3c7 !important;
    color: #f59e0b !important;
}

.order-status.status-skipped {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

.wpcro-timeline-status.status-paused {
    background: #fef3c7;
    color: #f59e0b;
}

.wpcro-timeline-status.status-skipped {
    background: #f1f5f9;
    color: #64748b;
}

.wpcro-skipped-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #fff9eb;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: 13px;
    color: #92400e;
    margin-top: 5px;
}

.wpcro-skipped-notice svg {
    flex-shrink: 0;
    color: #f59e0b;
}