/*
 Theme Name:   Astra Child
 Theme URI:    https://example.com/
 Description:  Child theme for Astra
 Author:       Your Name
 Template:     astra
 Version:      1.0.0
*/

/* Scope styles only to the order form */
/* ===============================
   Order Form Wrapper
   =============================== */
.order-form-wrapper {
    max-width: 900px;          /* keeps form nicely centered */
    margin: 2rem auto;         /* top/bottom spacing, centered */
    padding: 2rem;             /* breathing room inside */
    background: #ffffff;       /* clean white card */
    border-radius: 12px;       /* soft rounded edges */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* subtle shadow */
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* Heading inside form */
.order-form-wrapper h2,
.order-form-wrapper h3 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--ast-global-color-2, #222); /* Astra global text color fallback */
}

/* Labels */
.order-form-wrapper label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #444;
}

/* Inputs, selects, textareas */
.order-form-wrapper input[type="text"],
.order-form-wrapper input[type="email"],
.order-form-wrapper input[type="number"],
.order-form-wrapper select,
.order-form-wrapper textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f9f9f9;
    transition: border-color 0.2s ease, background 0.2s ease;
}

/* Focus states */
.order-form-wrapper input:focus,
.order-form-wrapper select:focus,
.order-form-wrapper textarea:focus {
    border-color: var(--ast-global-color-0, #3b82f6); /* Astra accent blue fallback */
    background: #fff;
    outline: none;
}

/* Error messages */
.order-form-wrapper .error {
    color: #d9534f;
    font-size: 0.9rem;
    margin-top: -0.75rem;
    margin-bottom: 1rem;
}

/* Buttons */
.order-form-wrapper button,
.order-form-wrapper input[type="submit"] {
    background: var(--ast-global-color-0, #3b82f6); /* Astra primary */
    color: #fff;
    font-weight: 600;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.order-form-wrapper button:hover,
.order-form-wrapper input[type="submit"]:hover {
    background: #2563eb; /* darker shade of blue */
    transform: translateY(-1px);
}

.order-form-wrapper button:active,
.order-form-wrapper input[type="submit"]:active {
    transform: translateY(0);
}

.required-field::after {
    content: '*';
    color: red;
    margin-right: 4px;
}

.form-row {
    display: flex;
    align-items: center; /* keeps them vertically aligned */
    gap: 10px; /* space between label and input */
    margin-bottom: 18px; 
}

.form-row select {
  max-width: 170px;   /* adjust as needed */
  width: auto;        /* shrink to fit content */
}
.form-row label {
    min-width: 120px; /* adjust to align nicely */
}
.form-row input {
    flex: 1; /* input stretches to fill remaining space */
}

.form-row.stacked {
    display: block; /* everything flows vertically */
}

.form-row.stacked label {
    display: block;
    margin-bottom: 6px;
}

.form-row.stacked textarea {
    width: 100%;
    margin-bottom: 6px;
}
.form-row .checkbox-group {
  display: flex;
  align-items: center;
  gap: 6px; /* small spacing between checkbox and text */
}
.helper-text {
    font-size: 11px;
    color: #666;
}

.input_wrapper {
  display: flex;
  flex-direction: column;    /* stack input and helper text */
}

.input_wrapper select,
.input_wrapper input,
.input_wrapper textarea {
  margin-bottom: 4px;        /* tiny space before helper text */
}

.order_price_totals {
  display: inline-block;
  vertical-align: middle; 
  padding: 10px 20px;
  font-size: 1.5rem;   /* larger text for emphasis */
  font-weight: 700;
  color: #1a73e8;      /* primary accent color – adjust to match brand */
  background: #f1f5f9; /* soft neutral background */
  border: 2px solid #1a73e8;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}

/* Wrapper */
.discount-wrapper {
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fafafa;
  margin-bottom: 20px;
}

/* Title */
.discount-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

/* Input and button row */
.discount-box label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.discount_code {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-right: 10px;
  width: 200px;
}

/* Verify button */
.small_button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: #4CAF50;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s ease;
}
.small_button:hover {
  background: #43a047;
}

/* Help text */
.discount-help {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #555;
}

.discount-note {
  margin-top: 6px;
  padding: 8px 10px;
  background: #f1f1f1;
  border-left: 4px solid #4CAF50;
  border-radius: 6px;
  font-size: 0.8rem;
}

/* Success savings display */
.discount-savings {
  font-weight: bold;
  color: green;
  line-height: 25px;
  font-size: 18px;
  margin-top: 10px;
}
.hidden {
  display: none;
}

/* Error / check result */
.discount-check {
  font-weight: 600;
  color: red;
  font-size: 16px;
  margin-top: 12px;
  text-align: center;
}

/* Discount pane container */
.order_discount_pane {
  padding: 15px 20px;
  background: #f9fdf9;
  border: 1px solid #d4edda;
  border-radius: 10px;
  font-size: 1rem;
  color: #155724;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.6;
}

/* Coupon display box */
.coupon-box {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px dashed #28a745;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

/* Coupon code */
.discount_coupon_code {
  color: #28a745;
  font-family: monospace;
}

/* Copy button */
.copy-btn {
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.3s ease;
}
.copy-btn:hover {
  background: #218838;
}
.copy-btn:active {
  background: #1e7e34;
}

.form-rowtwo {
  display: flex;
  align-items: center;
  gap: 15px; /* space between recaptcha and button */
  flex-wrap: wrap; /* allow wrapping if needed */
}

.form-rowtwo .g-recaptcha {
  flex: 1 1 auto; /* recaptcha takes available space */
}

.form-rowtwo .preview {
  flex: 0 0 auto;
}

.select2-container {max-width:170px;}

/* Mobile: stack vertically */
@media (max-width: 768px) {
.order-form-wrapper {
        padding: 1.25rem;
    }
    
  .form-rowtwo {
    flex-direction: column;
    align-items: flex-start; /* left align */
  }

  .form-rowtwo .preview {
    margin-top: 10px; /* spacing between recaptcha and button */
    width: 100%;      /* button stretches nicely */
  }

  .form-rowtwo .order_submit {
    width: 100%; /* make button full width on mobile */
  }

}

/* Container */
.mylogformcontainer {
  max-width: 400px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-family: "Segoe UI", Roboto, sans-serif;
}

/* Header */
.login-header {
  text-align: center;
  margin-bottom: 20px;
}
.login-header h2 {
  font-size: 1.6rem;
  color: #333;
  margin-bottom: 8px;
}
.login-header p {
  color: #666;
  font-size: 0.95rem;
  margin: 0;
}

/* Errors */
.login-errors {
  background: #ffe6e6;
  border: 1px solid #ffb3b3;
  color: #cc0000;
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.login-errors p {
  margin: 5px 0;
  font-size: 0.9rem;
}

/* Form elements */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #444;
}
.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}
.form-group input:focus {
  border-color: #3f51b5;
  outline: none;
  box-shadow: 0 0 0 2px rgba(63,81,181,0.1);
}

/* Button */
.btn-login {
  width: 100%;
  padding: 12px;
  background: #3f51b5;
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 15px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.btn-login:hover {
  background: #303f9f;
}

/* Footer links */
.login-footer {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}
.login-footer .login-link {
  font-size: 0.9rem;
  color: #3f51b5;
  text-decoration: none;
  transition: color 0.2s ease;
}
.login-footer .login-link:hover {
  color: #303f9f;
}

/* Wrapper */
.form-messages {
  margin: 1rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Error Box */
.error-messages {
  background: linear-gradient(135deg, #fdecea, #fff5f5);
  border-left: 5px solid #e53935;
  color: #b71c1c;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  animation: fadeIn 0.4s ease-in-out;
}

.error-messages p {
  margin: 0.4em 0;
}

/* Success Box */
.success-message {
  background: linear-gradient(135deg, #e8f5e9, #f9fffa);
  border-left: 5px solid #43a047;
  color: #256029;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  animation: fadeIn 0.4s ease-in-out;
}

.success-message p {
  margin: 0.4em 0;
}

/* Subtle animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}


@media (min-width: 769px) {
  .form-row select {
    max-width: 300px;
  }
  
  .select2-container {max-width:350px;}
}