/**
 * Frontend styles for Custom Checkbox Products plugin
 */

.ccp-custom-fields-container {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  background: #f9f9f9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ccp-top-text,
.ccp-bottom-text {
  margin: 15px 0;
  border-radius: 4px;
  line-height: 1.6;
}

.ccp-bottom-text {
  margin: 10px 0 30px 0;
  font-size: 12px;
  font-style: italic;
}

.ccp-top-text p:last-child,
.ccp-bottom-text p:last-child {
  margin-bottom: 0;
}

.ccp-options-wrapper {
  margin: 20px 0;
}

.ccp-options-wrapper h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.ccp-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ccp-option-item {
  border-radius: 6px;
  color: #fff;
  padding: 8px;
  display: flex;
  transition: all 0.3s ease;
  align-items: center;
}

.ccp-option-item:hover {
  border-color: #ffffff;
}

.ccp-option-item label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  margin: 0;
  font-weight: normal;
}

.ccp-option-item input[type="checkbox"] {
  margin: 0 12px 0 0;
  margin-top: 2px;
  transform: scale(1.2);
  accent-color: #007cba;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ddd;
  border-radius: 3px;
  background-color: #fff;
  position: relative;
  cursor: pointer;
}

.ccp-option-item input[type="checkbox"]:checked {
  background-color: #007cba;
  border-color: #007cba;
}

.ccp-option-item input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.ccp-option-name {
  font-weight: 500;
  color: #fff;
  display: block;
}

.ccp-option-description {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  display: block;
}

/* Responsive design */
@media (max-width: 768px) {
  .ccp-custom-fields-container {
    margin: 15px 0;
    padding: 15px;
  }

  .ccp-top-text,
  .ccp-bottom-text {
    padding: 12px;
  }

  .ccp-option-item {
    padding: 12px;
  }

  .ccp-option-item input[type="checkbox"] {
    transform: scale(1.3);
    width: 20px;
    height: 20px;
  }

  .ccp-option-item input[type="checkbox"]:checked::after {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .ccp-custom-fields-container {
    padding: 12px;
  }

  .ccp-option-item {
    padding: 10px;
  }

  .ccp-options-wrapper h4 {
    font-size: 15px;
  }

  .ccp-option-item input[type="checkbox"] {
    transform: scale(1.4);
    width: 22px;
    height: 22px;
  }

  .ccp-option-item input[type="checkbox"]:checked::after {
    font-size: 16px;
  }
}

/* Cart and checkout styling */
.ccp-cart-options {
  margin: 10px 0;
  padding: 10px;
  background: #f8f9fa;
  border-left: 3px solid #ffffff;
  border-radius: 0 4px 4px 0;
}

.ccp-cart-options dt {
  font-weight: 600;
  color: #333;
}

.ccp-cart-options dd {
  margin: 5px 0 0 0;
  color: #666;
}

/* Order details styling */
.ccp-order-options {
  margin: 10px 0;
  padding: 10px;
  background: #f8f9fa;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
}

.ccp-order-options strong {
  color: #333;
}

/* Email styling */
.ccp-email-custom-fields {
  margin: 20px 0;
}

.ccp-email-custom-fields h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 16px;
}

.ccp-email-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.ccp-email-table th,
.ccp-email-table td {
  padding: 12px;
  text-align: left;
  border: 1px solid #eee;
}

.ccp-email-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.ccp-email-table ul {
  margin: 0;
  padding-left: 20px;
}

.ccp-email-table li {
  margin-bottom: 4px;
}

/* Admin order styling */
.ccp-admin-order-options {
  font-size: 13px;
}

.ccp-admin-order-options strong {
  display: block;
  margin-bottom: 5px;
  color: #333;
}

.ccp-admin-order-options ul {
  margin: 0;
  padding-left: 15px;
}

.ccp-admin-order-options li {
  margin-bottom: 2px;
  color: #666;
}
