/* Nexus Contact Form - Robust Fixes */

.ost-nexus-container {
      padding: 2.5rem;
      max-width: 800px;
      margin: 2rem auto;
      box-sizing: border-box;
      width: 100%;
}

.ost-nexus-form * {
      box-sizing: border-box;
}

.ost-nexus-form label {
      display: block;
      font-size: 0.8rem;
      font-weight: 700;
      margin-bottom: 0.6rem;
      color: rgba(255, 255, 255, 0.7);
      letter-spacing: 0.05em;
      text-transform: uppercase;
}

/* Fix for overlapping fields: Use min-width: 0 on grid items */
.ost-nexus-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 2rem;
      width: 100%;
      margin-bottom: 1.5rem;
}

.ost-field-group {
      margin-bottom: 1.5rem;
      width: 100%;
      min-width: 0;
      /* Prevents overflow in flex/grid */
}

.ost-nexus-form input,
.ost-nexus-form select,
.ost-nexus-form textarea {
      width: 100%;
      background: rgba(10, 10, 10, 0.4) !important;
      /* Darker background */
      border: 1px solid rgba(255, 255, 255, 0.15) !important;
      border-radius: 10px;
      padding: 1rem;
      color: #ffffff !important;
      font-size: 1rem;
      transition: all 0.3s ease;
      display: block;
}

/* Dropdown specific fixes */
.ost-nexus-form select {
      cursor: pointer;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 1rem center;
      background-size: 1.2rem;
      padding-right: 3rem;
}

.ost-nexus-form select option {
      background-color: #000000 !important;
      color: #ffffff !important;
      padding: 10px;
}

.ost-nexus-form input:focus,
.ost-nexus-form select:focus,
.ost-nexus-form textarea:focus {
      outline: none;
      border-color: #8b5a2b !important;
      background: rgba(255, 255, 255, 0.08) !important;
      box-shadow: 0 0 20px rgba(139, 90, 43, 0.3);
}

.ost-nexus-submit {
      background: #8b5a2b !important;
      color: #ffffff !important;
      border: none !important;
      padding: 1.2rem 2.5rem;
      border-radius: 50px;
      font-weight: 800;
      cursor: pointer;
      letter-spacing: 0.1em;
      transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 240px;
      text-decoration: none;
      text-transform: uppercase;
}

.ost-nexus-submit:hover {
      transform: translateY(-4px);
      box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
      background: #a67c52 !important;
}

.ost-nexus-submit:disabled {
      opacity: 0.7;
      cursor: not-allowed;
      transform: none;
}

/* Loader specific fix */
.ost-loader {
      width: 24px;
      height: 24px;
      border: 3px solid rgba(255, 255, 255, 0.2);
      border-top: 3px solid #ffffff;
      border-radius: 50%;
      animation: ostSpin 0.8s linear infinite;
      display: none;
      /* Crucial: hide by default */
      position: absolute;
}

@keyframes ostSpin {
      0% {
            transform: rotate(0deg);
      }

      100% {
            transform: rotate(360deg);
      }
}

.ost-nexus-submit.is-loading .btn-text {
      visibility: hidden;
}

.ost-nexus-submit.is-loading .ost-loader {
      display: block;
}

.ost-response-msg {
      margin-top: 2rem;
      padding: 1.2rem;
      border-radius: 12px;
      display: none;
      font-size: 1rem;
      text-align: center;
      font-weight: 600;
}

.ost-response-msg.success {
      background: rgba(46, 204, 113, 0.15);
      color: #2ecc71;
      border: 1px solid #2ecc71;
}

.ost-response-msg.error {
      background: rgba(231, 76, 60, 0.15);
      color: #e74c3c;
      border: 1px solid #e74c3c;
}

/* GDPR Checkbox Styling */
.ost-gdpr-check {
      margin-top: 1rem;
}

.ost-checkbox-container {
      display: flex;
      align-items: flex-start;
      cursor: pointer;
      font-size: 0.9rem;
      color: rgba(255, 255, 255, 0.6);
      line-height: 1.4;
}

.ost-checkbox-container input {
      width: auto !important;
      margin-right: 12px;
      margin-top: 4px;
      cursor: pointer;
}

.ost-checkbox-label {
      flex: 1;
      text-transform: none !important;
      font-weight: 400 !important;
      letter-spacing: normal !important;
}