/**
* Components Frontend Styles
*
* @package DCS_Tiered_Variations
* @since 2.0.0
*/

/* Components Form Container */
.dcs-tv-components-form {
   max-width: 600px;
   margin: 0 auto;
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
   font-size: 16px;
   line-height: 1.5;
   color: #333;
}

/* Components List */
.dcs-components-list {
   margin-bottom: 20px;
   background: #fff;
   border-radius: 12px;
   box-shadow: 0 2px 8px rgba(0,0,0,0.08);
   overflow: hidden;
}

/* Component Item */
.dcs-component-item {
   border-bottom: 1px solid #e9ecef;
   padding: 20px;
   transition: background-color 0.2s ease;
}

.dcs-component-item:last-child {
   border-bottom: none;
}

.dcs-component-item:hover {
   background-color: #f8f9fa;
}

/* Component Header */
.dcs-component-header {
   display: flex;
   align-items: center;
   gap: 15px;
}

.dcs-component-info {
   flex: 1;
   min-width: 0;
}

.dcs-component-name {
   font-weight: 600;
   font-size: 15px;
   color: #2c3e50;
   margin: 0;
   display: flex;
   align-items: center;
   gap: 5px;
}

.dcs-component-required {
   color: #dc3545;
   font-size: 16px;
}

.dcs-component-price {
   color: #6c757d;
   font-size: 13px;
   white-space: nowrap;
   text-align: right;
   min-width: 100px;
}

.dcs-price-value {
   font-weight: 600;
   color: #5e72e4;
   font-size: 15px;
}

/* Quantity Controls */
.dcs-component-quantity {
   display: flex;
   align-items: center;
   gap: 8px;
   margin-right: 20px;
}

.dcs-component-quantity label {
   margin: 0;
   font-size: 13px;
   color: #6c757d;
   white-space: nowrap;
}

.dcs-quantity-wrapper {
   display: flex;
   align-items: center;
   background: #f8f9fa;
   border-radius: 6px;
   overflow: hidden;
   border: 1px solid #dee2e6;
}

.dcs-qty-minus,
.dcs-qty-plus {
   width: 36px;
   height: 36px;
   border: none;
   background: transparent;
   color: #495057;
   font-size: 20px;
   font-weight: 300;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: all 0.2s ease;
   padding: 0;
   line-height: 1;
}

.dcs-qty-minus:hover:not(:disabled),
.dcs-qty-plus:hover:not(:disabled) {
   background: #e9ecef;
   color: #212529;
}

.dcs-qty-minus:disabled {
   opacity: 0.4;
   cursor: not-allowed;
}

.dcs-qty-input {
   width: 50px;
   height: 36px;
   border: none;
   border-left: 1px solid #dee2e6;
   border-right: 1px solid #dee2e6;
   text-align: center;
   font-size: 15px;
   font-weight: 500;
   background: #fff;
   color: #212529;
   -moz-appearance: textfield;
}

.dcs-qty-input::-webkit-outer-spin-button,
.dcs-qty-input::-webkit-inner-spin-button {
   -webkit-appearance: none;
   margin: 0;
}

.dcs-qty-input:focus {
   outline: none;
   background: #f0f4ff;
}

/* Pricing Tiers Display */
.dcs-pricing-tiers-info {
    margin-top: 10px;
    background: #f0f7ff;
    border: 1px solid #d0e3ff;
    border-radius: 6px;
    padding: 12px;
}

.dcs-pricing-tiers-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 8px;
}

.dcs-pricing-tiers-header .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.dcs-pricing-tiers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dcs-pricing-tier {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.dcs-pricing-tier.active {
    background: #e3f2fd;
    border-color: #1976d2;
    font-weight: 600;
}

.tier-quantity {
    color: #666;
}

.tier-price {
    color: #1976d2;
    font-weight: 600;
}

/* Combo Hint */
.dcs-combo-hint {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.dcs-combo-hint-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #856404;
}

.dcs-combo-hint-header .dashicons {
    font-size: 20px;
    color: #f39c12;
}

.dcs-combo-hint-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dcs-combo-hint-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ffeaa7;
}

.dcs-combo-hint-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.combo-name {
    display: block;
    color: #533f03;
    font-weight: 600;
    margin-bottom: 8px;
}

.combo-pricing-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.combo-tier {
    background: #fff;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.combo-tier-qty {
    color: #666;
}

.combo-tier-price {
    color: #e74c3c;
    font-weight: 600;
}

/* Configuration Display */
.dcs-component-config {
    margin-top: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

/* Pieces Configuration List */
.dcs-pieces-config-list {
    display: flex;
    flex-direction: column;
}

.dcs-piece-config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.dcs-piece-config-item:last-child {
    border-bottom: none;
}

.dcs-piece-config-item:hover {
    background-color: #f0f4ff;
}

.dcs-piece-text {
    font-size: 13px;
    font-weight: 700;
    color: #495057;
    line-height: 1.4;
}

/* Button Styles */
.dcs-piece-edit-btn,
.dcs-piece-edit-change,
.dcs-piece-edit-adjust {
    background-color: #ffffff;
    border: 1px solid #e09000;
    color: #e09000;
    min-width: 80px!important;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: auto;
    transition: all 0.2s ease;
}

.dcs-piece-edit-btn:hover,
.dcs-piece-edit-change:hover,
.dcs-piece-edit-adjust:hover {
    border-color: #667eea;
    background-color: #f0f4ff;
    color: #5563d1;
}

/* Components Summary */
.dcs-components-summary {
   background: #fff;
   border-radius: 12px;
   padding: 25px;
   box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dcs-components-summary h3 {
   font-size: 18px;
   font-weight: 600;
   color: #2c3e50;
   margin: 0 0 20px 0;
   text-align: center;
}

/* Summary Empty State */
.dcs-summary-empty {
   text-align: center;
   padding: 20px;
   background: #800000;
    border-radius: 5px;
}

.dcs-summary-empty p {
   color: #ffffff;
   font-weight: bold;
   font-size: 14px;
   margin: 0;
}

/* Summary Components & Bundles
.dcs-summary-components,
.dcs-summary-bundles {
    margin-bottom: 20px;
}
 */
.dcs-summary-components h4,
.dcs-summary-bundles h4 {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin: 0 0 10px 0;
}

.dcs-summary-component-item,
.dcs-summary-bundle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.dcs-summary-component-item:last-child,
.dcs-summary-bundle-item:last-child {
    border-bottom: none;
}

.component-info,
.bundle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.component-name,
.bundle-name {
    color: #333;
    font-weight: 500;
}

.component-qty,
.bundle-qty {
    color: #666;
    font-size: 12px;
}

.component-total {
    font-weight: 600;
    color: #1976d2;
}

.bundle-price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.bundle-unit-price {
    font-size: 12px;
    color: #666;
}

.bundle-total {
    font-weight: 600;
    color: #22c55e;
}

/* Bundle Section Styling */
.dcs-summary-bundles {
    background: #e8f5e9;
    border-radius: 6px;
    padding: 12px;
}

.dcs-summary-bundles h4 {
    color: #2e7d32;
}

/* Summary Totals 
.dcs-summary-totals {
    margin-top: 15px;
}
*/
.dcs-subtotal-price,
.dcs-bundle-discount {
    font-size: 14px;
}

.dcs-bundle-discount-row {
    color: #2e7d32;
}

/* Summary Content */
.dcs-summary-content {
   text-align: left;
}

.dcs-summary-details {
   margin-bottom: 15px;
}

.dcs-summary-row {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 8px 0;
   font-size: 14px;
   color: #495057;
}

.dcs-summary-divider {
   padding-top: 12px;
   border-top: 1px solid #e9ecef;
   margin-top: 8px;
   font-size: 16px;
   color: #212529;
}

.dcs-total-quantity,
.dcs-unit-price {
   font-weight: 600;
   color: #212529;
}

.dcs-total-price {
   font-weight: 700;
   color: #5e72e4;
   font-size: 18px;
}

/* Legal Info */
.dcs-summary-legal {
   text-align: center;
   padding: 15px 0;
   border-top: 1px solid #e9ecef;
   border-bottom: 1px solid #e9ecef;
   margin: 15px 0;
}

.dcs-legal-text,
.dcs-shipping-text {
   font-size: 12px;
   color: #6c757d;
   margin: 2px 0;
   line-height: 1.4;
}

/* Savings Info */
.dcs-savings-info {
   background: #fef3c7;
   color: #92400e;
   padding: 12px 16px;
   border-radius: 8px;
   margin: 15px 0;
   font-size: 14px;
   font-weight: 500;
   text-align: center;
   border: 1px solid #fde68a;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
}

.dcs-savings-info .dashicons {
   font-size: 20px;
   color: #f59e0b;
}

.dcs-savings-amount {
   font-weight: 700;
   color: #78350f;
}

/* Add to Cart Button */
.dcs-add-to-cart-wrapper {
   margin-top: 20px;
}

.dcs-add-to-cart-btn {
   width: 100%;
   background: #22c55e;
   color: #fff;
   border: none;
   padding: 15px 24px;
   border-radius: 8px;
   font-size: 16px;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.2s ease;
   text-transform: uppercase;
   letter-spacing: 0.5px;
   box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.dcs-add-to-cart-btn:hover:not(:disabled) {
   background: #16a34a;
   transform: translateY(-1px);
   box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.dcs-add-to-cart-btn:active:not(:disabled) {
   transform: translateY(0);
   box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.dcs-add-to-cart-btn:disabled {
   background: #e5e7eb;
   color: #9ca3af;
   cursor: not-allowed;
   box-shadow: none;
}

.dcs-btn-loading {
   display: inline-flex;
   align-items: center;
   gap: 8px;
}

/* Component Variants Section */
.dcs-component-variants-section {
   margin-top: 15px;
   padding: 15px;
   background: #f8f9fa;
   border-radius: 8px;
   border: 1px solid #e9ecef;
}

.dcs-variants-container {
   margin-bottom: 15px;
}

.dcs-variant-group {
   margin-bottom: 12px;
}

.dcs-variant-group label {
   display: block;
   font-size: 13px;
   font-weight: 600;
   color: #495057;
   margin-bottom: 6px;
}

.dcs-variant-select {
   width: 100%;
   padding: 8px 12px;
   border: 1px solid #ced4da;
   border-radius: 6px;
   font-size: 14px;
   background: #fff;
   color: #495057;
   cursor: pointer;
   transition: all 0.2s ease;
}

.dcs-variant-select:focus {
   outline: none;
   border-color: #5e72e4;
   box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.1);
}

.dcs-variant-select option[data-color] {
   padding-left: 25px;
   position: relative;
}

.dcs-variants-actions {
   display: flex;
   gap: 10px;
   justify-content: flex-end;
}

.dcs-variants-confirm,
.dcs-variants-cancel {
   padding: 8px 16px;
   border-radius: 6px;
   font-size: 14px;
   font-weight: 500;
   cursor: pointer;
   transition: all 0.2s ease;
   border: none;
}

.dcs-variants-confirm {
   background: #5e72e4;
   color: #fff;
}

.dcs-variants-confirm:hover:not(:disabled) {
   background: #4c63d2;
}

.dcs-variants-confirm:disabled {
   background: #adb5bd;
   cursor: not-allowed;
}

.dcs-variants-cancel {
   background: #f8f9fa;
   color: #495057;
   border: 1px solid #dee2e6;
}

.dcs-variants-cancel:hover {
   background: #e9ecef;
}

/* Notification Styles */
.dcs-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    max-width: 350px;
}

.dcs-notification-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dcs-notification-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
   .dcs-tv-components-form {
       padding: 0 15px;
   }

   .dcs-component-header {
       flex-wrap: wrap;
   }

   .dcs-component-info {
       width: 100%;
       margin-bottom: 10px;
   }

   .dcs-component-price {
       margin-right: auto;
   }

   .dcs-component-quantity {
       margin-right: 10px;
   }

   .dcs-dialog-content {
       width: 95%;
       max-height: 90vh;
   }
}

@media (max-width: 480px) {
   .dcs-component-header {
       gap: 10px;
   }

   .dcs-component-name {
       font-size: 14px;
   }

   .dcs-qty-minus,
   .dcs-qty-plus {
       width: 28px;
       height: 28px;
       font-size: 16px;
   }

   .dcs-qty-input {
       width: 40px;
       height: 28px;
       font-size: 13px;
   }

   .dcs-add-to-cart-btn {
       font-size: 14px;
       padding: 12px 16px;
   }
   
   .dcs-config-edit {
       margin-left: 10px;
       padding: 3px 8px;
       font-size: 11px;
   }
}