/* ── Floating Button ───────────────────────────────────────────────── */
.rc-pwa-float {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  border-radius: 50px;
  padding: 12px 18px 12px 14px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  user-select: none;
}
.rc-pwa-float:hover {
  background: #1ebe58;
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
  transform: translateY(-2px);
}
.rc-pwa-float .fab {
  font-size: 22px;
  line-height: 1;
}
.rc-pwa-float-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ── Modal backdrop ────────────────────────────────────────────────── */
.rc-pwa-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rc-pwa-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
body.rc-pwa-open {
  overflow: hidden;
}

/* ── Modal box ─────────────────────────────────────────────────────── */
.rc-pwa-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  margin: 16px;
  padding: 36px 32px 28px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  scrollbar-width: thin;
  scrollbar-color: #d0d0d0 transparent;
}
.rc-pwa-box::-webkit-scrollbar { width: 5px; }
.rc-pwa-box::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 4px; }

/* ── Close button ──────────────────────────────────────────────────── */
.rc-pwa-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 18px;
  line-height: 30px;
  text-align: center;
  color: #666;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}
.rc-pwa-close:hover { background: #e0e0e0; color: #0f113e; }

/* ── Modal header ──────────────────────────────────────────────────── */
.rc-pwa-header {
  text-align: center;
  margin-bottom: 24px;
}
.rc-pwa-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #e8fdf0;
  border-radius: 50%;
  margin-bottom: 12px;
}
.rc-pwa-icon .fab {
  font-size: 30px;
  color: #25d366;
}
.rc-pwa-header h4 {
  font-size: 20px;
  font-weight: 700;
  color: #0f113e;
  margin: 0 0 6px;
}
.rc-pwa-header p {
  font-size: 13px;
  color: #888;
  margin: 0;
  line-height: 1.5;
}

/* ── Form fields ───────────────────────────────────────────────────── */
.rc-pwa-row {
  display: flex;
  gap: 12px;
}
.rc-pwa-row .rc-pwa-field {
  flex: 1;
}
.rc-pwa-field {
  margin-bottom: 14px;
}
.rc-pwa-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #0f113e;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.rc-pwa-field label .req {
  color: #e74c3c;
  margin-left: 2px;
}
.rc-pwa-field label .opt {
  color: #aaa;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.rc-pwa-field input,
.rc-pwa-field textarea {
  width: 100%;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 14px;
  color: #0f113e;
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
  font-family: inherit;
  resize: none;
}
.rc-pwa-field input:focus,
.rc-pwa-field textarea:focus {
  border-color: #25d366;
  background: #fff;
}
.rc-pwa-field input.rc-pwa-invalid,
.rc-pwa-field textarea.rc-pwa-invalid {
  border-color: #e74c3c;
  background: #fff8f8;
}

/* ── Upload area ───────────────────────────────────────────────────── */
.rc-pwa-upload {
  border: 2px dashed #d8dde6;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: #f9fafc;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.rc-pwa-upload:hover,
.rc-pwa-upload.drag-over {
  border-color: #25d366;
  background: #f0fdf5;
}
.rc-pwa-upload.rc-pwa-invalid {
  border-color: #e74c3c;
  background: #fff8f8;
}
.rc-pwa-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.rc-pwa-upload-ui .fas {
  font-size: 28px;
  color: #b0bac9;
  display: block;
  margin-bottom: 6px;
}
.rc-pwa-upload-ui p {
  font-size: 13px;
  color: #666;
  margin: 0 0 4px;
}
.rc-pwa-upload-ui p span {
  color: #25d366;
  font-weight: 600;
  text-decoration: underline;
}
.rc-pwa-upload-ui small {
  font-size: 11px;
  color: #aaa;
}

/* ── File preview ──────────────────────────────────────────────────── */
.rc-pwa-file-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.rc-pwa-file-preview .fas {
  color: #25d366;
  font-size: 18px;
}
.rc-pwa-file-preview span {
  font-size: 13px;
  color: #0f113e;
  font-weight: 500;
  word-break: break-all;
}
#rc-pwa-file-remove {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
#rc-pwa-file-remove:hover { color: #c0392b; }

/* ── Error message ─────────────────────────────────────────────────── */
.rc-pwa-error {
  background: #fff0f0;
  border: 1px solid #f5c6c6;
  border-radius: 8px;
  color: #e74c3c;
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

/* ── Submit button ─────────────────────────────────────────────────── */
.rc-pwa-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 4px;
  font-family: inherit;
}
.rc-pwa-submit:hover {
  background: #1ebe58;
  transform: translateY(-1px);
}
.rc-pwa-submit:disabled {
  background: #a0e6bc;
  cursor: not-allowed;
  transform: none;
}
.rc-pwa-submit .fab {
  font-size: 18px;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .rc-pwa-box {
    padding: 28px 18px 22px;
    border-radius: 16px;
  }
  .rc-pwa-row {
    flex-direction: column;
    gap: 0;
  }
  .rc-pwa-float-label {
    display: none;
  }
  .rc-pwa-float {
    padding: 13px;
    border-radius: 50%;
  }
}
