/**
 * Bitcoin Invoice Form - Frontend Styles
 */

/* Base form styles - matching wp-bitcoin-newsletter */
.bif-form {
  max-width: 560px;
  margin: 1em 0;
  padding: 20px;
  border: 1px solid #ddd;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Field styles - matching wp-bitcoin-newsletter */
.bif-field {
  margin-bottom: 20px;
}

.bif-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
}

.bif-field input,
.bif-field textarea,
.bif-field select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  background: #fff;
}

.bif-field input:focus,
.bif-field textarea:focus,
.bif-field select:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.bif-field .required {
  color: #cc0000;
}

.bif-field textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

/* Button styles - matching wp-bitcoin-newsletter */
.bif-button,
.bif-button:link,
.bif-button:visited,
.bif-button:hover,
.bif-button:active,
.bif-button:focus {
  background: #0073aa;
  color: #fff;
  padding: 14px 28px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  text-decoration: none !important;
  display: inline-block;
  min-width: 140px;
}

.bif-button:hover,
.bif-button:focus {
  background: #005a87;
  text-decoration: none !important;
}

.bif-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  text-decoration: none !important;
}

/* Amount and Currency fields side by side */
.bif-field-amount,
.bif-field-currency {
  display: inline-block;
  vertical-align: top;
}

.bif-field-amount {
  width: calc(80% - 10px);
}

.bif-final-amount {
  justify-content: flex-end;
}

.bif-field-currency {
  margin-right: 20px;
  width: calc(20% - 10px);
  margin-left: 0;
}

/* Submit field - matching wp-bitcoin-newsletter */
.bif-form-actions {
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  border-top: 1px solid #eee;
}

/* Messages */
.bif-message {
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 4px;
    font-weight: 500;
    border-left: 4px solid;
}

.bif-message-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.bif-message-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

/* Modal - matching wp-bitcoin-newsletter */
.bif-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.bif-modal {
  background: #fff;
  max-width: 420px;
  width: 92%;
  height: 850px;
  max-height: 850px;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bif-payment-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  flex: 1;
}
.bif-hide { display: none !important; }

/* Payment Info */
.bif-payment-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.bif-payment-amount,
.bif-payment-description {
    margin-bottom: 12px;
    padding: 8px 0;
}

.bif-payment-amount:last-child,
.bif-payment-description:last-child {
    margin-bottom: 0;
}

.bif-payment-amount strong,
.bif-payment-description strong {
    color: #333;
    display: inline-block;
    min-width: 100px;
}

/* Payment Iframe */
.bif-payment-iframe-container {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.bif-payment-iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

/* Payment Status */
.bif-payment-status {
    text-align: center;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
    border: 1px solid #e9ecef;
}

.bif-payment-loading {
    color: #f7931a;
    font-weight: 500;
}

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

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

/* Responsive design - matching wp-bitcoin-newsletter */
@media (max-width: 768px) {
  .bif-form {
    margin: 1em 0;
  }

  /* Stack amount and currency fields on mobile */
  .bif-field-amount,
  .bif-field-currency {
    display: block;
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  /* Mobile modal adjustments */
  .bif-modal {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .bif-modal-backdrop {
    padding: 0;
  }
}

/* Loading States */
.bif-loading {
    opacity: 0.6;
    pointer-events: none;
}
