/* =========================================================================
   WooCommerce Custom Subscription Manager Stylesheet
   ========================================================================= */

.custom-sub-manager-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 30px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111111;
    box-sizing: border-box;
}

.sub-manager-card {
    background-color: #ffffff;
    border: 1px solid #E5E5E5;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.sub-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #E5E5E5;
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.sub-manager-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #111111;
}

.sub-manager-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .sub-manager-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Details Column */
.sub-details-col {
    background-color: #F8F8FC;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    padding: 24px;
}

.sub-details-col h3,
.sub-actions-col h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #111111;
}

.sub-details-table {
    width: 100%;
    border-collapse: collapse;
}

.sub-details-table td {
    padding: 10px 0;
    font-size: 0.875rem;
    color: #555555;
    border-bottom: 1px dashed #E5E5E5;
}

.sub-details-table tr:last-child td {
    border-bottom: none;
}

.sub-details-table td strong {
    color: #111111;
}

/* Actions Column */
.sub-actions-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.action-section {
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    padding: 24px;
    background-color: #ffffff;
}

.action-section.upgrade-box {
    border-left: 4px solid #7B3FE4;
}

.action-section.cancellation-box {
    border-left: 4px solid #ef4444;
}

.upgrade-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.upgrade-selector label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111111;
}

.upgrade-selector select {
    width: 100% !important;
    height: 42px !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 10px !important;
    padding: 0 36px 0 16px !important;
    font-family: inherit !important;
    font-size: 0.875rem !important;
    background-color: #ffffff !important;
    color: #111111 !important;
    box-sizing: border-box !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

.lead-time-text,
.cancellation-info,
.cancellation-cost {
    font-size: 0.825rem;
    color: #555555;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.cancellation-cost strong {
    color: #ef4444;
}

.info-note {
    font-size: 0.875rem;
    color: #666666;
    background-color: #f3f4f6;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.warning-note {
    font-size: 0.875rem;
    color: #b45309;
    background-color: #fffbeb;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

/* Buttons */
.custom-sub-manager-wrapper .button {
    width: 100%;
    height: 44px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border: none !important;
    box-shadow: none !important;
    transition: all 0.25s ease !important;
    color: #ffffff !important;
    box-sizing: border-box !important;
}

.custom-sub-manager-wrapper .btn-upgrade {
    background-color: #7B3FE4 !important;
}

.custom-sub-manager-wrapper .btn-upgrade:hover {
    background-color: #5A2DB0 !important;
}

.custom-sub-manager-wrapper .btn-cancel {
    background-color: #ef4444 !important;
}

.custom-sub-manager-wrapper .btn-cancel:hover {
    background-color: #dc2626 !important;
}

.custom-sub-manager-wrapper .btn-reactivate {
    background-color: #f97316 !important;
}

.custom-sub-manager-wrapper .btn-reactivate:hover {
    background-color: #ea580c !important;
}

/* Status Badges */
.custom-sub-manager-wrapper .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.custom-sub-manager-wrapper .status-badge.status-active {
    background-color: #ecfdf5;
    color: #10b981;
}

.custom-sub-manager-wrapper .status-badge.status-pending-cancel {
    background-color: #fffbeb;
    color: #d97706;
}

.custom-sub-manager-wrapper .status-badge.status-cancelled {
    background-color: #fef2f2;
    color: #ef4444;
}

/* Alert Notification Messages */
.custom-sub-manager-wrapper .woocommerce-message {
    padding: 16px 24px 16px 52px !important;
    position: relative !important;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.custom-sub-manager-wrapper .message-success {
    background-color: #ecfdf5 !important;
    border-left: 4px solid #10b981 !important;
    color: #065f46 !important;
}

.custom-sub-manager-wrapper .message-error {
    background-color: #fef2f2 !important;
    border-left: 4px solid #ef4444 !important;
    color: #991b1b !important;
}

.action-section.payment-box {
    border-left: 4px solid #7B3FE4;
}

.custom-sub-manager-wrapper .btn-change-payment {
    background-color: #F8F8FC !important;
    color: #7B3FE4 !important;
    border: 1px solid #E5E5E5 !important;
}

.custom-sub-manager-wrapper .btn-change-payment:hover {
    background-color: #EDE9FF !important;
    border-color: #7B3FE4 !important;
    color: #7B3FE4 !important;
}
