/* === GLOBAL SETTINGS === */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    text-align: center;
    scroll-behavior: smooth;
	padding-top: 60px; /*  */
}

/* Omogućava prelamanje dugačkih linkova */
p, .card p, .card .card-text, .content-box, content-box-wide p {
  word-break: break-word;
  overflow-wrap: break-word;
}


h1,
h2,
h3 {
    color: #919eb7;
    /*color: #acb5c8;*/
}


h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 8px;
}

h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 4px;
}

/* === LIGHT MODE HEADER & FOOTER === */
body:not(.bg-dark) header,
body:not(.bg-dark) footer,
body:not(.bg-dark) .footer-area,
body:not(.bg-dark) .header-navbar {
    background-color: #ffffff;
    color: #333;
}

body:not(.bg-dark) header .container,
body:not(.bg-dark) footer .container,
body:not(.bg-dark) .header-navbar .container {
    background-color: #ffffff;
}


header {
    /*position: sticky;*/
    position: fixed !important; /* Fiksno pozicioniranje */
    top: 0;          /* Zatvara se za vrh ekrana */
    left: 0;         /* Poravnato uz levu stranu */
    width: 100%;     /* Proširuje se na celu širinu */
    z-index: 10000;   /* Osigurava da je header iznad ostalih elemenata */

}


/*.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 15px;
}*/


body:not(.wide) .container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 15px;
}


/* === INPUTS & FORMS === */

textarea,
textarea.form-control {
  border-radius: 25px !important;
  padding: 12px 16px;
  min-height: 120px;
  resize: vertical;
}


input[type="email"],
input[type="password"],
input[type="text"],
input[type="url"],
select {
  border-radius: 999px !important;
  padding: 12px 20px !important;
  background-color: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}


.g-recaptcha {
  border-radius: 12px;
  overflow: hidden;
  padding: 6px;
  background-color: #fff;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}


input.form-control {
  border-radius: 999px !important;
  padding: 12px 16px !important;
  border: 1px solid #ccc;
  background-color: #fff;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}


input:focus {
    border-color: #00b3ff;
    box-shadow: 0 0 4px rgba(0, 179, 255, 0.3);
    outline: none;
}

form input {
    font-size: 1.1rem;
    padding: 0.75rem;
}

/* === QR CODE === */
.qr-wrapper img,
.qr-img {
    width: 120px !important;
    height: 120px !important;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    flex-shrink: 0; /* sprečava QR da se skuplja */
}


.qr-wrapper {
    flex: 0 0 auto; /* stopi fleks raspinjanje */
}


/* === SHORT LINK DISPLAY === */
.short-result {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

#short-link {
    width: 60%;
    font-weight: bold;
    text-align: center;
    background-color: #f3f3f3;
    border: 1px solid #ccc;
    padding: 8px 12px;
    font-size: 1rem;
    border-radius: 4px;
    min-width: 250px;
}

/* === MODERAN MINIMALAN STIL ZA SVA DUGMAD === */

/* Osnovni stil za dugmad i <a class="btn"> */
.btn,
button,
a.btn,
.copy-link-btn,
.share-toggle,
.custom-copy-link-btn,
.custom-share-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    background-color: white;
    color: #212529;
    border: 1px solid #ced4da;
}

.btn-icon-only {
    padding: 4px !important;
    gap: 0 !important;
    width: auto;
    height: auto;
    line-height: 1;
    background-color: transparent;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon-only img {
    display: block;
    margin: 0;
    padding: 0;
}



/* Hover za sve varijacije */
.btn:hover,
button:hover,
a.btn:hover,
.copy-link-btn:hover,
.share-toggle:hover,
.custom-copy-link-btn:hover,
.custom-share-toggle:hover{
    background-color: #f8f9fa;
    color: #212529;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

/* Pastelne akcione klase */
.btn-primary {
    background-color: #A5D8FF;
    color: #003459;
    border: none;
}
.btn-primary:hover {
    background-color: #74C0FC;
    color: #002B45;
}

.btn-success {
    background-color: #C3FBC3;
    color: #245C24;
    border: none;
}
.btn-success:hover {
    background-color: #A8E6A8;
    color: #1C4C1C;
}

.btn-warning {
    background-color: #FFE5A3;
    color: #664d03;
    border: none;
}
.btn-warning:hover {
    background-color: #FFD666;
    color: #4d3c02;
}

.btn-danger {
    background-color: #FFB3B3;
    color: #660000;
    border: none;
}
.btn-danger:hover {
    background-color: #FF9999;
    color: #4d0000;
}

.btn-light {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ccc;
}
.btn-light:hover {
    background-color: #e2e6ea;
}

/* Ikonice u dugmadima */
.copy-link-btn img,
.share-toggle img,
.custom-copy-link-btn img,
.custom-share-toggle img {
    filter: grayscale(0%);
    transition: filter 0.2s ease;
}
.copy-link-btn:hover img,
.share-toggle:hover img,
.custom-copy-link-btn:hover img,
.custom-share-toggle:hover img{
    filter: brightness(1.1);
}

/* Disable */
.btn:disabled,
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === OUTLINE PASTELNE VARIJANTE === */

.btn-outline-secondary.btn-sm {
  border-radius: 999px;
  font-weight: 500;
  padding: 5px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-outline-primary {
    color: #0d6efd;
    border: 2px solid #A5D8FF;
    background-color: transparent;
}
.btn-outline-primary:hover {
    background-color: #A5D8FF;
    color: #003459;
}

.btn-outline-success {
    color: #198754;
    border: 2px solid #C3FBC3;
    background-color: transparent;
}
.btn-outline-success:hover {
    background-color: #C3FBC3;
    color: #245C24;
}

.btn-outline-warning {
    color: #664d03;
    border: 2px solid #FFE5A3;
    background-color: transparent;
}
.btn-outline-warning:hover {
    background-color: #FFE5A3;
    color: #4d3c02;
}

.btn-outline-danger {
    color: #dc3545;
    border: 2px solid #FFB3B3;
    background-color: transparent;
}
.btn-outline-danger:hover {
    background-color: #FFB3B3;
    color: #660000;
}

.btn-outline-light {
    color: #333;
    border: 2px solid #ddd;
    background-color: transparent;
}
.btn-outline-light:hover {
    background-color: #f8f9fa;
}


/*  SHARE ICONS   */

.share-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 180px;
}

/* Dropdown skriveno stanje (klasa d-none) */
.share-dropdown.d-none {
    display: none !important;
}

.share-dropdown a img {
    width: 24px;
    height: 24px;
    opacity: 0.8;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.share-dropdown a:hover img {
    transform: scale(1.1);
    opacity: 1;
}

/* Osiguraj wrapper ima pozicionu referencu */
.share-wrapper {
    position: relative;
    display: inline-block;
}


/* === LINK STYLING === */

.footer-link {
    color: #6c757d; /* Bootstrap-ova "secondary" */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #343a40;
}


/* === CARDS === */
.card {
    border-radius: 16px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 10px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.card-body {
    transition: opacity 0.2s ease;
}

.card:hover .card-body {
    opacity: 0.98;
}

.card-title a {
    font-size: 1.2rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.card p,
.card .card-text {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* === BADGES === */

.badge-outline {
  background-color: transparent;
  border: 1px solid #00b3ff;
  color: #00b3ff;
  font-weight: 600;
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.terms-content {
    font-size: 1rem;
    line-height: 1.7;
}


.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}


#togglePasswordBtn {
    border-left: none;
    margin-left: -1px; /* da se spoji lepo */
    height: 100%;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    padding: 0 12px;
}

.input-group-text {
    user-select: none;
    transition: background-color 0.2s ease;
}

.input-group-text:hover {
    background-color: #f0f0f0;
}


/* dashboard.css */

.dashboard-wrapper {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
}

.content-box {
    max-width: 720px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

.content-box-wide {
    max-width: 1280px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

footer.footer {
  width: 100%;
  background-color: white;
}


 /* POST CARDS STYLE */

    .custom-bullets li {
      list-style: none;
      position: relative;
      padding-left: 1em;
    }
    .custom-bullets li::before {
      content: "→";
      position: absolute;
      left: 0;
      color: #0d6efd;
      font-weight: bold;
    }
    .card h6 {
      font-weight: 600;
    }


/*  Zaobljeni kontejner za skraćeni URL */
.short-url-pill {
  background-color: #cff4fc; /* svetloplava pozadina */
  border: 1px solid #99e0f5; /* nijansirano tamniji okvir */
  border-radius: 50px;
  display: inline-block;
  padding: 16px 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/*  Stil samog linka */
.short-url-link {
  font-weight: 600;
  color: #0d6efa;
  font-size: 1.1rem;
  text-decoration: none;
}

/*  Toast notifikacija */
.copy-toast-local {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1ce4eb;
  color: #fff;
  padding: 6px 16px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  font-weight: 500;
  font-size: 0.95rem;
  z-index: 10;
}

.table-responsive {
  overflow-x: auto;
  white-space: nowrap;
}

.btn-xs {
  padding: 2px 8px;
  font-size: 0.75rem;
}



.fade-in {
  animation: fadeIn 0.4s ease-in-out;
}

.kpi-update {
  animation: kpiPulse 0.5s ease-in-out;
  font-weight: bold;

}

@keyframes kpiPulse {
  0% { transform: scale(1); opacity: 1; color: inherit; }
  50% { transform: scale(1.2); opacity: 0.7; color: #007bff; }
  100% { transform: scale(1); opacity: 1; color: inherit; }
}

  @keyframes kpiFlash {
    0%   { color: #007bff; transform: scale(1); }
    50%  { color: #00b894; transform: scale(1.2); }
    100% { color: inherit; transform: scale(1); }
  }

.header-navbar {
  padding-top: 1rem;
  padding-bottom: 1rem;
  /* ili horizontalno */
  padding-left: 1rem;
  padding-right: 1rem;
}

.bigger-tip {
  /*font-size: 105%;*/
  padding-bottom: 5px;
  display: inline-block; /* Za bolju kontrolu margine/paddings */
}

.dropdown-menu-custom .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.dropdown-menu-custom a.dropdown-item {
  padding: 0.4rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.dropdown-menu-custom a.dropdown-item:hover {
  background-color: #f8f9fa;
}

.shorten-again-btn {
  margin-bottom: 1rem; /* ili više po potrebi */
}

.modal-dialog {
  margin-top: 120px !important;
  transform: none !important;
  top: auto !important;
}

.swal2-toast-centered {
  margin-top: 80px !important; /* pomeri ispod headera */
  left: 50% !important;
  transform: translateX(-50%) !important;
}


/* === RESPONSIVE === */
@media (max-width: 576px) {

   main {
    padding-left: 8px;
    padding-right: 8px;
  }

  .dashboard-wrapper {
    padding: 1.2rem 1rem;
  }
  
    .card {
        padding: 1rem;
    }

    .btn span {
        display: none;
    }

    .card-title a {
        font-size: 1rem;
    }

    .share-dropdown {
        flex-wrap: wrap;
    }
	.navbar-toggler {
    margin-right: 12px;
  }
    .header-navbar {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .content-box, content-box-wide {
    padding: 0.5rem 0.5rem !important; /* manji padding horizontalno */
  }

  #shorten-form {
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }
    .g-recaptcha {
    display: block;
    margin: 0 auto;
    padding: 4px;
  }
  
}

@media (min-width: 768px) {
  .dashboard-wrapper {
    max-width: 1080px;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1200px) {
  .dashboard-wrapper {
    max-width: 1140px;
  }
}

@media (max-width: 992px) {

  /* Skini defaultnu bootstrap animaciju visine */
  .collapse, .collapsing {
    transition: none !important;
    height: auto !important;
  }

  /* Odredi position: absolute i fullscreen širinu */
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1rem;
    /* Priprema za fade */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  /* Kad je .show, fade in */
  .navbar-collapse.show {
    opacity: 1;
    visibility: visible;
  }
}