/*
 * MCSD Dashboard Styles
 * Modern, clean card layout with distinct sections.
 */
.mcsd-container { max-width: 800px; margin: 0 auto; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

/* Alerts */
.mcsd-alert { padding: 12px 16px; margin-bottom: 24px; border-radius: 8px; font-size: 0.9rem; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.alert-success { background-color: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background-color: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.mcsd-alert-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: inherit; opacity: 0.6; }
.mcsd-alert-close:hover { opacity: 1; }

/* Card Container */
.mcsd-row-card { background: #fff; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); margin-bottom: 32px; overflow: hidden; }

/* Header */
.mcsd-card-header { background: #f9fafb; padding: 20px 24px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; }
.mcsd-header-left { display: flex; flex-direction: column; gap: 4px; }
.mcsd-abo-id { font-size: 0.85rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; }

/* Status Badges */
.mcsd-status-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; align-self: flex-start; }
.st-active { background: #d1fae5; color: #065f46; }
.st-hold { background: #fef3c7; color: #92400e; }
.st-cancelled { background: #f3f4f6; color: #4b5563; }

.mcsd-header-right { text-align: right; }
.mcsd-total-price { font-size: 1.5rem; font-weight: 800; color: #111827; line-height: 1; }
.mcsd-subtext { font-size: 0.8rem; color: #6b7280; display:block; margin-top: 4px; }

/* Body */
.mcsd-card-body { padding: 24px; display: flex; flex-direction: column; gap: 24px; }

/* Item List */
.mcsd-item-list { display: flex; flex-direction: column; gap: 12px; }
.mcsd-item-row { display: flex; align-items: center; background: #fff; border: 1px solid #e5e7eb; padding: 16px; border-radius: 8px; transition: border-color 0.2s; }
.mcsd-item-row:hover { border-color: #d1d5db; }
.mcsd-item-img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; margin-right: 16px; border: 1px solid #f3f4f6; }
.mcsd-item-info { flex: 1; }
.mcsd-item-name { font-size: 1rem; font-weight: 600; color: #1f2937; display: block; margin-bottom: 4px; }
.mcsd-item-price { font-size: 0.9rem; color: #6b7280; font-weight: 500; }

/* Stepper */
.mcsd-qty-stepper { display: flex; align-items: center; background: #fff; border-radius: 6px; border: 1px solid #d1d5db; margin-right: 16px; overflow: hidden; }
.qty-btn { padding: 0 12px; text-decoration: none; font-weight: bold; color: #4b5563; font-size: 1rem; line-height: 32px; cursor: pointer; background: #f9fafb; transition: background 0.2s; }
.qty-btn:hover { background: #f3f4f6; color: #111827; }
.qty-val { padding: 0 12px; font-size: 0.95rem; font-weight: 600; min-width: 32px; text-align: center; border-left: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb; color: #111827; }

/* Delete Button */
.btn-delete { color: #ef4444; background: none; border: none; font-weight: bold; font-size: 1.5rem; cursor: pointer; padding: 4px 8px; line-height: 1; opacity: 0.7; transition: opacity 0.2s; }
.btn-delete:hover { color: #dc2626; opacity: 1; }

/* Inputs & Selects */
.mcsd-input { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.9rem; cursor: pointer; font-family: inherit; color: #1f2937; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.mcsd-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); outline: none; }

/* Date Change Form */
.mcsd-date-form { display: flex; gap: 8px; align-items: center; }
.mcsd-date-btn { border: none; background: #3b82f6; color: #fff; font-size: 0.85rem; border-radius: 6px; cursor: pointer; padding: 0 16px; font-weight: 600; height: 42px; transition: background 0.2s; }
.mcsd-date-btn:hover { background: #2563eb; }
input[type="date"].mcsd-input { height: 42px; }

/* Footer Actions */
.mcsd-card-footer { padding: 24px; background: #f9fafb; border-top: 1px solid #e5e7eb; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.btn { display: inline-block; padding: 12px 24px; border-radius: 8px; text-align: center; text-decoration: none; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

.btn-renew { background: #2563eb; color: #fff; }
.btn-renew:hover { background: #1d4ed8; box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2); }

.btn-pause { background: #f59e0b; color: #fff; }
.btn-pause:hover { background: #d97706; box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.2); }

.btn-cancel { background: #fff; border: 1px solid #e5e7eb; color: #ef4444; box-shadow: none; }
.btn-cancel:hover { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }

.btn-sec { background: #fff; color: #374151; border: 1px solid #d1d5db; }
.btn-sec:hover { background: #f3f4f6; color: #111827; border-color: #9ca3af; }

@media (max-width: 600px) {
    .mcsd-card-header { flex-direction: column; align-items: flex-start; }
    .mcsd-header-right { text-align: left; width: 100%; margin-top: 10px; }
    .mcsd-card-footer { flex-direction: column; }
    .btn { width: 100%; }
}

/* Progress Bar */
.mcsd-progress-wrapper { background: #e5e7eb; border-radius: 999px; height: 8px; width: 100%; margin: 0 0 8px 0; overflow: hidden; }
.mcsd-progress-fill { background: #10b981; height: 100%; border-radius: 999px; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.mcsd-progress-text { font-size: 0.75rem; color: #6b7280; text-align: right; display: block; margin-bottom: 20px; font-weight: 500; }
.mcsd-progress-text-large { font-size: 1.1rem; color: #111827; text-align: center; display: block; margin-bottom: 20px; font-weight: 700; margin-top: 8px; }

/* Free Shipping Badge */
.mcsd-free-shipping { background: #ecfdf5; color: #047857; padding: 4px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; display: inline-block; letter-spacing: 0.025em; }

/* Address Form */
.mcsd-address-toggle { display: inline-block; margin-top: 0; font-size: 0.85rem; color: #2563eb; cursor: pointer; font-weight: 600; transition: color 0.2s; }
.mcsd-address-toggle:hover { color: #1d4ed8; text-decoration: underline; }

.mcsd-address-form { display: none; margin-top: 16px; background: #f9fafb; padding: 24px; border-radius: 8px; border: 1px solid #e5e7eb; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
.mcsd-form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.mcsd-form-group { flex: 1; }
.mcsd-form-group label { display: block; font-size: 0.75rem; font-weight: 600; color: #4b5563; margin-bottom: 6px; }
.mcsd-form-group input, .mcsd-form-group select { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.9rem; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.mcsd-form-group input:focus, .mcsd-form-group select:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); outline: none; }

.mcsd-btn-save { background: #2563eb; color: #fff; border: none; padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 0.9rem; transition: background 0.2s; display: inline-block; margin-top: 8px; }
.mcsd-btn-save:hover { background: #1d4ed8; }

/* New Sections Layout */
.mcsd-section { border-top: 1px solid #e5e7eb; padding-top: 24px; margin-top: 24px; }
.mcsd-section:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.mcsd-section-title { font-size: 0.85rem; text-transform: uppercase; color: #6b7280; font-weight: 700; margin-bottom: 12px; letter-spacing: 0.025em; display: block; }

/* Attributes */
.mcsd-item-meta { font-size: 0.75rem; color: #6b7280; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.mcsd-meta-pill { background: #f3f4f6; padding: 2px 8px; border-radius: 4px; border: 1px solid #e5e7eb; color: #4b5563; font-weight: 500; }
