/* Importação da fonte */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Estilos globais e reset básico */
:root {
    --primary-color: #0056b3;
    --secondary-color: #e2e6ea;
    --text-color: #333;
    --background-color: #f4f7f9;
    --border-color: #ccc;
    --hover-color: #004494;
    --danger-color: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 20px;
    position: relative;
    min-height: 100vh;
}

/* Container para o botão de sair */
.top-right-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Container principal */
.content-container {
    max-width: 900px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Estilos do cabeçalho */
.main-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.main-header h1 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 5px;
}

.main-header p {
    font-style: italic;
    color: #666;
}

/* Estilos da navegação */
.main-nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.main-nav a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #fff;
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.main-nav a:hover {
    background-color: var(--hover-color);
}

/* Títulos das seções */
h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

/* Botões de Ação com Estilo Bonito e Moderno */
.action-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: bold;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    border-radius: 25px; /* Bordas mais arredondadas */
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.action-button:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.action-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-button.logout-button {
    background-color: var(--danger-color);
}

.action-button.logout-button:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* teste*/
.image-card {
    position: relative;
}

.image-card.add-card {
    border: 2px dashed var(--primary-color);
    background-color: #f0f4ff;
    color: var(--primary-color);
    text-align: center;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-card.add-card p {
    margin: 0;
}

.image-preview-container-card {
    width: 100%;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 5px;
    cursor: pointer;
    border: 2px dashed #ccc;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.image-preview-container-card:hover {
    background-color: #f0f0f0;
}

.image-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.remove-card-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Estilos para a ferramenta Polaroid */
#pagesContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.a4-page {
    width: 29.7cm;
    height: 21.0cm;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
    margin: 20px 0;
    background-color: #FFFFFF;
    box-shadow: none;
}

.polaroid {
    /* Remove as dimensões fixas, o grid irá dimensionar */
    background-color: #FFFFFF;
    border: 1px solid #ccc;
    box-shadow: none;
    position: relative;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    border: 1px solid #adadad;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: grab;
}

/* Estilos para a legenda da Polaroid */
.polaroid-caption {
    width: 90%;
    margin-top: 5px;
    border: none;
    text-align: center;
    font-family: 'Arial', sans-serif;
    padding: 5px 0;
    resize: none;
    overflow: hidden;
    height: auto;
    min-height: 40px;
    white-space: pre-wrap;
}

/* Estilos da biblioteca Cropper.js */
.cropper-view-box,
.cropper-face {
    border-radius: 0 !important;
}

.preview-canvas {
    max-width: 100%; /* Limita a largura ao container */
    height: auto; /* Permite que a altura se ajuste */
}