/* ESTILIZAÇÃO GERAL DE TEMA DAS PÁGINAS (DESKTOP FIRST) */

body {
    display: flex;
    justify-content: center;
    align-items: center;
    
}

.background{
    position: fixed;
    height: 100vh;
    width: 100vw;
    top:0;
    left:0;
    background: url("assets/images/background-desktop.png") no-repeat center center;
    background-size: cover;
    z-index: -1;
   
}


.draw1{
    position: relative;
    bottom: 700px;
    
}

.draw2{
    position: relative;
    bottom: 150%;
    left: 20%;
   
}

.logo{
    margin-bottom: 6%;
}

main {
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center ;
    padding: 40px;
    width: 450px;   
}

h1{
    color: white;
    text-align: center;
}

h3{
    color: white;
    text-align: center;
    font-weight: 400;
    margin-top: 20px;
    font-size: 18px;
}

/* ESTILIZAÇÃO DO FORMULÁRIO */

.ticket-form{
    margin-top:6%;
    display: flex;
    width: 350px;
    align-items: center;
    flex-direction: column;
    color: rgb(255, 255, 255);  
}

form{
    display: flex;
    flex-direction: column;
    gap: 35px;
    width: 100%;
}

form div{
    display: flex;
    flex-direction: column;   
}

input, select{
    height: 40px;
    border-radius: 8px;
    border: 1px solid;
    padding: 0 10px;
    margin-top:3%;
    font-size: 16px;
    background-color: rgba(72, 57, 118, 0.5); 
    border-color: rgb(220, 217, 213);
    color: #ffffff;
    caret-color: #ffffff;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.avatar-box {
    border: 2px dashed #888;
    background: rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 8px;
    margin-top:3%;
    text-align: center;
    color:rgb(250, 250, 250);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 140px;
    width: 100%;
    box-sizing: border-box;
}

#avatar-preview {
    background: rgba(255,255,255,0.2); 
    width: 80px;
    height: 80px;
    border-radius: 30%;
    object-fit: cover;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    
}

input[type="file"] {
  display: none;  
}

.avatar-info{
    font-size: 12px;
}

.avatar-info.error{
    color: #ff6b6b;
}

.error-text{
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 6px;
}

.error-text.error-text--above{
    margin-top: 0;
    margin-bottom: 6px;
}

.toast-container{
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
}

.toast{
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: fade-in 200ms ease-out;
}

.toast.toast--error{
    background: #e63946;
}

@keyframes fade-in{
    from{ opacity: 0; transform: translateY(-6px); }
    to{ opacity: 1; transform: translateY(0); }
}

.generate-btn{
    margin-top: 5%;
    background-color: #ed2c5c;
    color: rgb(25, 19, 88);
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}



/* ESTILIZAÇÃO DO TICKET GERADO (ticket.html)*/


.main-ticket {
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center ;
    padding: 40px;
    width: 650px;
       
    
}

.ticket{
   position: relative;
   width: 600px; /* ajuste conforme necessário */
   height: auto; 
  /* background: url('./assets/images/pattern-ticket.svg') no-repeat center center; */
  background-size: cover; 
  display: flex;
  align-items: center;
}

.ticket-content{
    background: url('./assets/images/pattern-ticket.svg') no-repeat center center;
    width: 610px;
   height: 400px;

  
}

.titulo-ticket{
    color: white;
    text-align: center;
    font-size: 30px;
    font-weight: 600;
}

.itens{
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 20px;
    top: 100px;
    margin-right: 45%;
}

.ticket-logo {
      
      margin-top: -20px;
      width: 160px;
      height: auto;
      margin-left: 40%;
      margin-bottom: 10%;
    }

.ticket-id {
      position: absolute;
      top: 160px;
      right: 32px;
      writing-mode: vertical-rl;
      text-orientation: mixed;
      font-size: 1.1rem;
      font-weight: bold;
      color: #7a74eb;
      letter-spacing: 2px;
    }

.ticket-info {
      display: flex;
      flex-direction: row;
      align-items: center;
      margin-top: 24px;
    }

.ticket-avatar {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      margin-right: 16px;
      object-fit: cover;
      align-self: flex-start;
    }

.ticket-name {
      font-size: 1.1rem;
      font-weight: 600;
      color: #ffffff;
    }

.ticket-github {
      font-size: 0.95rem;
      color: #ffffff;
    }

.ticket-date-location {
      text-align: center;
      margin-top: 16px;
      font-size: 0.98rem;
      color: #fffbfb;
    }




/* =================== MEDIA QUERIES - RESPONSIVIDADE  ================== */
/* Alvos: Nest Hub Max, iPad Air, iPhone 14 Pro Max, Galaxy Z Fold 5   */


/* Breakpoint 1: DESKTOPS MENORES e TABLETS EM PAISAGEM (1280px e abaixo)
  ===================================================================================== */
@media (max-width: 1280px) {
    
    main, .main-ticket {
        width: 90%;
    }

    .draw1, .draw2 {
        transform: scale(0.9);
    }
}


/* Breakpoint 2: TABLETS EM RETRATO (820px e abaixo)
  ===================================================================== */
@media (max-width: 820px) {
    
    
    h1, .titulo-ticket { font-size: 2.2rem; }
    h3 { font-size: 1.1rem; }

    .draw1 { bottom: -80px; left: -120px; transform: scale(0.8); }
    .draw2 { top: -120px; right: -120px; transform: scale(0.8); }

    /* --- Página do Formulário (index.html) --- */
    main {
        max-width: 450px;
    }
    .ticket-form {
        width: 100%;
    }

    /* --- Página do Ticket (ticket.html) --- */
    .main-ticket {
        max-width: 580px;
    }

    .ticket-header { top: 12%; left: 7%; gap: 12px; }
    .ticket-logo { width: 100px; }
    .ticket-date-location { font-size: 0.85rem; }
    .ticket-info { top: 48%; left: 7%; gap: 16px; }
    .ticket-name   { font-size: 1.4rem; }
    .ticket-github { font-size: 1rem; }
    .ticket-avatar { width: 70px; height: 70px; }
    .ticket-id { right: 25px; font-size: 1rem; }
}

/* Breakpoint 3: MOBILE (480px e abaixo) - AJUSTES PARA TICKET.HTML  */
/* =================================================================== */
@media (max-width: 480px) {

    
    .draw1, .draw2, .line {
        display: none;
    }

    main, .main-ticket {
        width: 100%;
        padding: 30px 15px;
    }

    /* --- Página do Formulário (index.html) --- */
    h1 { font-size: 1.6rem; line-height: 1.3; overflow-wrap: break-word; }
    h3 { font-size: 0.95rem; line-height: 1.5; overflow-wrap: break-word; }
    
    form { gap: 20px; }
    .avatar-box { min-height: 120px; padding: 15px; gap: 5px; font-size: 0.9rem; }
    #avatar-preview { width: 60px; height: 60px; }


    /* --- Página do Ticket (ticket.html)  --- */
    .titulo-ticket { 
        font-size: 1.8rem; 
        line-height: 1.2;
        margin-bottom: 10px; 
    }
    .main-ticket h3 { 
        font-size: 0.95rem;
        max-width: 90%; 
        margin: 0 auto 30px auto; 
        line-height: 1.4;
    }

    .ticket {
        width: 90%; 
        max-width: 320px; 
        margin-left: auto; 
        margin-right: auto; 
        margin-top: 40px; 
    }

    .ticket-content {
        
        padding-bottom: unset; 
        min-height: 200px; 
        display: grid; 
        grid-template-columns: 1fr auto; 
        grid-template-rows: auto 1fr; 
        padding: 20px; 
        gap: 15px; 
        position: relative; 
    }

    
    .ticket-header {
        grid-column: 1 / 2; 
        grid-row: 1 / 2;    
        flex-direction: row; 
        align-items: center;
        gap: 10px;
        position: static; 
        transform: none;
        width: auto;
    }
    
    .ticket-info {
        grid-column: 1 / 2;
        grid-row: 2 / 3;    
        flex-direction: row; 
        align-items: center;
        gap: 15px;
        position: static; 
        transform: none;
        width: auto;
        text-align: left; 
    }

    .ticket-user-details { 
        order: unset; 
        align-items: flex-start; 
    }

    .ticket-avatar {
        order: unset; 
        width: 50px; 
        height: 50px;
        border-width: 2px; 
    }

    .ticket-logo {
        width: 90px; 
    }
    .ticket-date-location {
        font-size: 0.75rem; 
    }
    .ticket-name {
        font-size: 1.1rem; 
    }
    .ticket-github {
        font-size: 0.85rem; 
    }


    .ticket-id {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
        position: static; 
        transform: none;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        font-size: 0.9rem; 
        letter-spacing: 1px;
        color: #dcbaff;
        border-left: 1px dashed rgba(255,255,255,0.3); 
        padding-left: 10px;
        display: flex; 
        align-items: center;
        justify-content: center;
        margin: -20px 0 -20px 0; 
    }
}