/*itsrlabs/apps/platform/static/css/_shared/buttons.css*/
/* ===========================================================
   ITSR BUTTON SYSTEM
   - Base:        .itsr-btn
   - Generic:     .itsr-btn-generic
   - Colors:      .btn-blue, .btn-green, .btn-orange, .btn-grey
   - Style mods:  .secondary (outline)
   - Effects:     .btn-effect
   - Width:       .w-10, .w-25, .w-50, .w-75, .w-100
   - Layout:      .itsr-flexible
   =========================================================== */

/* ===== BASE BUTTON PRIMITIVE ================================= */

.itsr-btn,
.itsr-btn-generic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;

  padding: 0.55rem 1.1rem;
  border-radius: 999px;

  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;

  /* Default neutrals – can be overridden by color utilities */
  --btn-bg: #e5e7eb;         /* base background         */
  --btn-bg-hover: #d1d5db;   /* hover background        */
  --btn-fg: #111827;         /* text color              */
  --btn-fg-hover: var(--btn-fg);
  --btn-border: transparent; /* border color            */

  --btn-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  --btn-shadow-hover: 0 6px 18px rgba(15, 23, 42, 0.18);

  background-color: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--btn-shadow);

  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.itsr-btn:hover,
.itsr-btn-generic:hover {
  background-color: var(--btn-bg-hover);
  color: var(--btn-fg-hover);
  transform: translateY(-1px);
  box-shadow: var(--btn-shadow-hover);
}

.itsr-btn:active,
.itsr-btn-generic:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.itsr-btn:focus-visible,
.itsr-btn-generic:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.65);
  outline-offset: 2px;
}

/* ===== DISABLED STATE ======================================== */

.itsr-btn:disabled,
.itsr-btn.is-disabled,
.itsr-btn-generic:disabled,
.itsr-btn-generic.is-disabled {
  --btn-bg:        #d1d5db;
  --btn-bg-hover:  #d1d5db;
  --btn-fg:        #9ca3af;
  --btn-fg-hover:  #9ca3af;
  --btn-border:    #d1d5db;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

/* ===== GENERIC VARIANT ======================================= */
/* Slightly toned-down default, for tertiary / neutral actions. */

.itsr-btn-generic {
  font-weight: 500;
  border-radius: 0.6rem;
  --btn-bg: #f3f4f6;
  --btn-bg-hover: #e5e7eb;
  --btn-fg: #111827;
  --btn-border: #e5e7eb;
  box-shadow: none;
}

/* ===========================================================
   COLOR UTILITIES
   Attach to .itsr-btn or .itsr-btn-generic
   e.g. class="itsr-btn btn-blue"
   =========================================================== */

/* ----- BLUES ---------------------------------- */
.btn-dark-blue {
  --btn-bg:        var(--p1-dark-blue);
  --btn-bg-hover:  #264163;           /* slightly darker */
  --btn-fg:        #ffffff;
  --btn-fg-hover:  #ffffff;
  --btn-border:    var(--p1-dark-blue);
}

.btn-blue {
  --btn-bg:        var(--p1-blue);
  --btn-bg-hover:  #045170;
  --btn-fg:        #ffffff;
  --btn-fg-hover:  #ffffff;
  --btn-border:    var(--p1-blue);
}

/* ----- GREENS ---------------------------------- */

.btn-dark-green {
  --btn-bg:        var(--p1-dark-green);
  --btn-bg-hover:  #094f3f;
  --btn-fg:        #ffffff;
  --btn-fg-hover:  #ffffff;
  --btn-border:    var(--p1-dark-green);
}

.btn-green {
  --btn-bg:        var(--p1-green);
  --btn-bg-hover:  #0e8f4d;
  --btn-fg:        #ffffff;
  --btn-fg-hover:  #ffffff;
  --btn-border:    var(--p1-green);
}

/* ----- YELLOW / ORANGE ------------------------- */

.btn-yellow {
  --btn-bg:        var(--p1-yellow);
  --btn-bg-hover:  #dcb702;
  --btn-fg:        #111827;
  --btn-fg-hover:  #111827;
  --btn-border:    var(--p1-yellow);
}

.btn-orange {
  --btn-bg:        var(--p1-orange);
  --btn-bg-hover:  #d89117;
  --btn-fg:        #111827;
  --btn-fg-hover:  #111827;
  --btn-border:    var(--p1-orange);
}

/* ----- REDS ------------------------------------ */

.btn-dark-red {
  --btn-bg:        var(--p1-dark-red);
  --btn-bg-hover:  #8d2b21;
  --btn-fg:        #ffffff;
  --btn-fg-hover:  #ffffff;
  --btn-border:    var(--p1-dark-red);
}

.btn-red {
  --btn-bg:        var(--p1-red);
  --btn-bg-hover:  #b34d2f;
  --btn-fg:        #ffffff;
  --btn-fg-hover:  #ffffff;
  --btn-border:    var(--p1-red);
}

/* ----- GREY ------------------------------------ */

.btn-grey {
  --btn-bg:        var(--p1-grey);
  --btn-bg-hover:  #af9fa1;
  --btn-fg:        #111827;
  --btn-fg-hover:  #111827;
  --btn-border:    var(--p1-grey);
}

/* ===========================================================
   STYLE MODIFIER: OUTLINE / SECONDARY
   Usage:
   - class="itsr-btn btn-blue secondary"
   =========================================================== */

.itsr-btn.secondary,
.itsr-btn-generic.secondary {
  background-color: transparent;
  color: var(--btn-bg);        /* text uses main color */
  border-color: var(--btn-bg); /* outline uses main color */
  box-shadow: none;
  --btn-fg-hover: #ffffff;     /* on hover, text becomes white */
}

.itsr-btn.secondary:hover,
.itsr-btn-generic.secondary:hover {
  background-color: var(--btn-bg);
  color: var(--btn-fg-hover);
  border-color: var(--btn-bg);
}

/* ===========================================================
   EFFECT UTILITIES (ADD-ON HOVER/ACTIVE BEHAVIOUR)
   Attach to any button:
   - class="itsr-btn btn-blue btn-effect"
   =========================================================== */

.btn-effect {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

.btn-effect:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
}

.btn-effect:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

/* ===========================================================
   WIDTH UTILITIES
   (If you already use Bootstrap's w-25 etc, you can skip this
    block; otherwise these give you the same behaviour.)
   Usage:
   - class="itsr-btn btn-green w-75"
   =========================================================== */

.w-10  { width: 10%; }
.w-25  { width: 25%; }
.w-50  { width: 50%; }
.w-75  { width: 75%; }
.w-100 { width: 100%; }

/* ===========================================================
   FLEXIBLE LAYOUT UTILITY
   Fills available space inside flex/grid parents.
   Usage:
   - class="itsr-btn btn-blue itsr-flexible"
   =========================================================== */

.itsr-flexible {
  flex: 1 1 auto;
  width: 100%;
}

/* You can also combine with width utilities if needed:
   class="itsr-btn btn-green itsr-flexible w-50"
   (flex:1 will let it grow within 50% constraint)
*/


/* =============
   HYPERLINK 
   ============= */

.itsr-link {
  color: var(--p1-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.itsr-link:hover,
.itsr-link:focus {
  color: var(--p1-dark-blue);
  text-decoration: underline;
}

/* =============
   INFO BUTTON (icon-only, reusable)
   Same as .subs-icon-btn.subs-info-btn for use across platform
   ============= */
.itsr-info-button-1 {
  width: 40px;
  height: 40px;
  border-radius: 0.9rem;
  border: 1px solid var(--clr-border-subtle, #e5e7eb);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.itsr-info-button-1:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  border-color: rgba(13, 110, 253, 0.25);
}
.itsr-info-button-1 i {
  font-size: 1.05rem;
  line-height: 1;
}
