/* Custom styles za QR Generator */

:root {
    --primary-color: #00d1b2;
    --primary-dark: #00a389;
    --secondary-color: #3273dc;
    --dark-bg: #363636;
    --light-bg: #f5f5f5;
}

/* Opći stilovi */
html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar prilagodbe */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-item.is-active {
    background-color: rgba(0,0,0,.1);
}

.navbar-item:hover {
    background-color: rgba(0,0,0,.05);
}

/* Hero sekcija */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

/* File upload - prevent long filenames from breaking layout */
.file-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* Ensure file component doesn't overflow on mobile */
@media screen and (max-width: 768px) {
    .file.has-name .file-name {
        max-width: 150px;
    }
    
    .file.has-name.is-fullwidth .file-name {
        flex-grow: 1;
        max-width: calc(100% - 100px);
    }
    
    /* Make the file input more compact on mobile */
    .field.has-addons .file-cta {
        padding-left: 0.75em;
        padding-right: 0.75em;
    }
    
    .field.has-addons .file-label {
        font-size: 0.875rem;
    }
}

/* Desktop - allow more space for filename */
@media screen and (min-width: 769px) {
    .file.has-name .file-name {
        max-width: 300px;
    }
}

/* Box hover efekt */
.box.is-clickable {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.box.is-clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,.1);
    border-color: var(--primary-color);
}

/* QR kod prikaz */
.qr-display {
    background: white;
    padding: 20px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0,0,0,.1);
}

/* Ograniči maksimalnu veličinu QR koda */
.qr-display img,
.qr-display svg {
    max-width: 256px;
    max-height: 256px;
    width: auto;
    height: auto;
}

/* Cookie obavijest */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #363636;
    color: white;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
}

.cookie-notice-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.cookie-notice-content p {
    margin: 0;
    flex: 1;
}

.cookie-notice-buttons {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .cookie-notice-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-notice-buttons {
        justify-content: center;
    }
}

/* Banner navigacija */
.rotating-banner {
    position: relative;
}

.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.banner-nav:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.banner-nav-prev {
    left: -20px;
}

.banner-nav-next {
    right: -20px;
}

@media (max-width: 768px) {
    .banner-nav {
        width: 35px;
        height: 35px;
        font-size: 0.75rem;
    }
    
    .banner-nav-prev {
        left: 5px;
    }
    
    .banner-nav-next {
        right: 5px;
    }
}

/* Banner indikatori */
.banner-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.banner-indicators .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.7);
}

.banner-indicators .indicator.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}

.qr-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.qr-svg-container svg {
    max-width: 100%;
    height: auto;
}

/* Form stilovi */
.qr-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

/* Compact form for desktop */
@media screen and (min-width: 1024px) {
    .qr-form {
        padding: 1.5rem;
    }
    
    .qr-form .field:not(:last-child) {
        margin-bottom: 1rem;
    }
    
    .qr-form hr {
        margin: 1.5rem 0;
    }
}

/* File upload */
.file-name {
    max-width: 300px;
}

/* Color input */
input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Loading animacija */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
    100% {
        opacity: 1;
    }
}

.is-loading {
    animation: pulse 1.5s cubic-bezier(.4,0,.6,1) infinite;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 0 !important;
}

/* Footer */
.footer {
    background-color: var(--light-bg);
    padding: 3rem 1.5rem 3rem;
}

/* Mobile prilagodbe */
@media screen and (max-width: 768px) {
    .navbar-menu {
        box-shadow: 0 8px 16px rgba(0,0,0,.1);
    }
    
    .hero.is-medium .hero-body {
        padding: 6rem 1.5rem;
    }
    
    .title.is-1 {
        font-size: 2rem;
    }
    
    .subtitle.is-3 {
        font-size: 1.25rem;
    }
    
    .box.is-clickable:hover {
        transform: none;
    }
}

/* Print stilovi */
@media print {
    .navbar,
    .breadcrumb,
    .footer,
    .button,
    .field:has(input[type="color"]),
    .field:has(input[type="file"]),
    .field:has(select) {
        display: none !important;
    }
    
    .qr-display {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Tamna tema podrška - DISABLED */
/* @media (prefers-color-scheme: dark) { */
@media (max-width: 0px) {
    :root {
        --primary-color: #00d1b2;
        --primary-dark: #00a389;
    }
    
    /* Bulma još nema built-in dark mode, ali možemo dodati osnovnu podršku */
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .box,
    .qr-form {
        background-color: #2a2a2a;
        color: #e0e0e0;
    }
    
    .input,
    .textarea,
    .select select {
        background-color: #3a3a3a;
        border-color: #4a4a4a;
        color: #e0e0e0;
    }
    
    .input:focus,
    .textarea:focus,
    .select select:focus {
        border-color: var(--primary-color);
    }
    
    .notification.is-light {
        background-color: #3a3a3a;
        color: #e0e0e0;
    }
    
    .has-background-light {
        background-color: #2a2a2a !important;
    }
    
    .footer {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .breadcrumb a {
        color: var(--primary-color);
    }
    
    .label {
        color: #e0e0e0;
    }
    
    .help {
        color: #b0b0b0;
    }
    
    code {
        background-color: #3a3a3a;
        color: #e0e0e0;
    }
}

/* Animacije za smooth transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toggle switch styles */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  background-color: #ccc;
  border-radius: 34px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: background-color 0.3s;
}

.switch:checked {
  background-color: #48c774;
}

.switch::before {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  top: 4px;
  left: 4px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}

.switch:checked::before {
  transform: translateX(26px);
}

.switch + label {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  cursor: pointer;
}

/* Subscription box styles */
.has-border-primary {
  border: 2px solid #00d1b2;
}

/* Dark theme switch styles - DISABLED */
@media (max-width: 0px) {
    .switch {
        background-color: #4a4a4a;
    }
    
    .switch:checked {
        background-color: #48c774;
    }
}

/* Accessibility poboljšanja */
.button:focus,
.input:focus,
.textarea:focus,
.select select:focus,
a:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.skip-to-content:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* QR kod animacija pri generiranju */
.qr-display.generating {
    position: relative;
    overflow: hidden;
}

.qr-display.generating::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

/* Notification stack */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Type cards grid enhancement */
.columns.is-multiline {
    margin-top: -0.75rem;
}

.columns.is-multiline .column {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Icon animations */
.icon.is-large i {
    transition: transform 0.3s ease;
}

.box.is-clickable:hover .icon.is-large i {
    transform: scale(1.1) rotate(5deg);
}

/* Form validation styles */
.input:invalid,
.textarea:invalid {
    border-color: #ff3860;
}

.input:valid,
.textarea:valid {
    border-color: #23d160;
}

/* QR result animation */
#qr-result > * {
    animation: fadeIn 0.5s ease-in;
}

/* Result container for desktop */
@media screen and (min-width: 1024px) {
    .sticky-result {
        position: static;
    }
    
    /* Maksimalna širina containera */
    .container {
        max-width: 1200px;
    }
    
    /* Kompaktnija sekcija */
    .section {
        padding: 1.5rem;
    }
}

/* Placeholder QR icon */
.placeholder-qr {
    padding: 40px;
    opacity: 0.3;
}

/* Two column layout adjustments */
@media screen and (min-width: 1024px) {
    .section .columns {
        align-items: flex-start;
    }
    
    .column.is-5 {
        flex: none;
        width: 40%;
        padding-right: 1.5rem;
    }
    
    .column.is-7 {
        flex: none;
        width: 60%;
        padding-left: 1.5rem;
    }
}

/* Mobile adjustments */
@media screen and (max-width: 1023px) {
    #qr-result {
        margin-top: 2rem;
    }
    
    .sticky-result {
        position: static;
    }
    
    .column.is-5,
    .column.is-7 {
        padding: 0.75rem;
        width: 100%;
    }
}

/* Smaller result box on desktop */
@media screen and (min-width: 1024px) {
    #qr-result .box {
        padding: 1.25rem;
    }
    
    #qr-result .title.is-4 {
        font-size: 1.25rem;
        margin-bottom: 1rem !important;
    }
    
    #qr-result .qr-display {
        margin-bottom: 1rem;
    }
    
    #qr-result .notification {
        padding: 0.75rem;
    }
}

/* API page styles */
.pricing-box {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,.1);
}

.pricing-box.is-primary {
    border: 2px solid var(--primary-color);
}

.pricing {
    margin: 2rem 0;
}

.pricing .price {
    color: var(--primary-color);
}

.pricing .period {
    color: #666;
    font-size: 1.25rem;
}

/* Code examples */
.code-example pre {
    overflow-x: auto;
    border-radius: 4px;
}

.code-example code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Tabs */
.tabs ul {
    border-bottom-color: #dbdbdb;
}

.tabs li.is-active a {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tabs a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* API documentation table */
.table th {
    background-color: #f5f5f5;
    font-weight: 600;
}