/* GLOBAL FONTS FOR TRADE KNOCK */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Manrope:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* The "Clean Corporate" choice (Great for data/tables) */
    --font-primary-inter: 'Inter', sans-serif;

    /* The "Technical & Precise" choice (Great for analytics) */
    --font-data-manrope: 'Manrope', sans-serif;

    /* The "Premium Tech" choice (Great for marketing/headlines) */
    --font-brand-jakarta: 'Plus Jakarta Sans', sans-serif;

    /* The "Minimalist Luxury" choice (Great for profiles/nav) */
    --font-sleek-outfit: 'Outfit', sans-serif;

    /* --- THE MASTER SWITCH --- */
    /* Change this variable to switch the font everywhere instantly */
    --tk-main-font: var(--font-sleek-outfit);
}

/* 1. Reset high-level elements */
html, body {
    font-family: var(--tk-main-font) !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

/* 2. Force inheritance on all interactive components */
*, *::before, *::after {
    box-sizing: border-box !important;
}

button, 
input, 
optgroup, 
select, 
textarea {
    font-family: var(--tk-main-font) !important;
}

/* 3. Specific weights for that "fine" professional look */
h1, h2, h3, .tk-action-title, .tk-main-name {
    font-weight: 600 !important; /* Semi-bold for titles */
    letter-spacing: -0.02em !important;
}

p, .tk-action-desc, .tk-label {
    font-weight: 400 !important; /* Clean weight for body text */
}

/* GLOBAL FONTS FOR TRADE KNOCK END */

/* Container for the form */
.tkf-form-engine {
    --tk-brand: #ed1e24;
}

/* Absolute Positioning for the "inside-input" look */
.tkf-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.tkf-input-group .form-control {
    height: 54px !important;
    padding-left: 50px !important; /* Space for the left icon */
    padding-right: 50px !important; /* Space for validation/eye icon */
    border-radius: 8px !important;
    border: 1.5px solid #ddd;
    font-size: 15px;
    width: 100%;
    transition: all 0.3s ease;
}

/* Left Icon Style */
.tkf-field-icon {
    position: absolute;
    left: 18px;
    color: #999;
    z-index: 10;
    pointer-events: none; /* User clicks "through" the icon into the input */
}

/* Eye Button Toggle */
.tkf-password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #999;
    z-index: 11;
    cursor: pointer;
    outline: none !important;
}

/* Validation Status Icon */
.tkf-validation-status {
    position: absolute;
    right: 50px; /* Sits next to eye for passwords, or 18px for others */
    z-index: 10;
}

.form-control:not(.tkf-password-input) ~ .tkf-validation-status {
    right: 18px;
}

/* Focus State */
.form-control:focus {
    border-color: var(--tk-brand) !important;
    box-shadow: 0 0 0 4px rgba(237, 30, 36, 0.1) !important;
}

.form-control:focus ~ .tkf-field-icon {
    color: var(--tk-brand);
}

/* Validation Visuals */
.is-invalid { border-color: var(--tk-brand) !important; background: #fff8f8 !important; }
.is-valid { border-color: #28a745 !important; background: #f8fff9 !important; }

/* The Upload Box Hint */
.upload-box {
    position: relative;
    overflow: hidden;
}
.upload-hint-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 40px;
    color: rgba(0,0,0,0.03);
    pointer-events: none;
}

/* Password Strength Bar */

/* Strength Meter Container */
.tkf-strength-wrapper {
    margin-top: 10px;
    height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}

.tkf-strength-wrapper.active {
    height: 35px;
    opacity: 1;
}

/* The Progress Track */
.tkf-strength-bar {
    height: 6px;
    background: #ebebeb;
    border-radius: 10px;
    overflow: hidden;
}

/* The Dynamic Meter */
#strength-progress {
    height: 100%;
    width: 0%;
    transition: width 0.5s ease, background-color 0.5s ease;
}

/* Precision Alignment for Icons inside Password fields */
.tkf-password-input {
    padding-right: 85px !important; /* Extra room for Eye + Validation Icons */
}

/* Feedback placement adjustment for password fields specifically */
.tkf-password-input ~ .tkf-validation-status {
    right: 45px !important;
}

/* State Colors */
.strength-weak { background-color: #ed1e24 !important; }   /* Brand Red */
.strength-medium { background-color: #ff9800 !important; } /* Amber */
.strength-strong { background-color: #28a745 !important; } /* Success Green */


/* Spinner for database checks */
.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(359deg); }
}

/* Tooltip style for validation errors */
.is-invalid + .tkf-validation-status:hover::after {
    content: attr(data-error);
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
}

.tkf-strength-bar { height: 4px; background: #eee; border-radius: 2px; overflow: hidden; }
#strength-progress { height: 100%; width: 0; transition: 0.3s; }
.is-valid { border-color: #28a745 !important; }
.is-invalid { border-color: #ed1e24 !important; }
.tkf-validation-status { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 5; }

/* Real-time Validation Status Icons */
.tkf-validation-status {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 5;
}

/* Password Strength Meter */
.tkf-strength-wrapper {
    display: none;
    margin-top: 10px;
}

.tkf-strength-bar {
    height: 4px;
    width: 100%;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
}

#strength-progress {
    height: 100%;
    width: 0%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Input Overrides for Error states */
.form-control.is-invalid {
    border-color: #e74c3c !important;
    background-image: none !important; /* Remove default bootstrap icon */
}

.form-control.is-valid {
    border-color: #2ecc71 !important;
    background-image: none !important;
}

/* Scroll-to-top Arrow Fixed Positioning */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--tk-red);
  color: #fff;
  border-radius: 50%;
  display: none; 
  align-items: center;
  justify-content: center;
  z-index: 9999;
  border: none;
  box-shadow: 0 10px 25px rgba(237,30,36,0.3);
  cursor: pointer;
  transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.back-to-top:hover { transform: scale(1.1) translateY(-5px); background: var(--tk-dark); }
.back-to-top i { font-size: 20px; }