/* Estilos Frontend */

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header img {
    height: 50px;
    width: auto;
}

header h2 {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 28px;
}

header nav {
    display: flex;
    gap: 15px;
}

header a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

header a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 20px;
}

h1 {
    color: #333;
    margin-top: 30px;
    margin-bottom: 20px;
}

p {
    color: #666;
    line-height: 1.6;
}

form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto 30px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

input[type="text"],
input[type="number"],
input[type="file"],
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="file"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button,
a.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    background-color: #667eea;
    color: white;
}

button:hover,
a.btn:hover {
    background-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

button:active,
a.btn:active {
    transform: translateY(0);
}

/* Estilos para a lista de imagens editáveis */
.sortable-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.sortable-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: move;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sortable-item:hover {
    background: #f9f9f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.image-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.image-container img {
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
    padding: 5px;
}

.image-actions {
    display: flex;
    gap: 8px;
}

.btn-edit,
.btn-remove {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-edit {
    background-color: #2196F3;
    color: white;
}

.btn-edit:hover {
    background-color: #0b7dda;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn-remove {
    background-color: #f44336;
    color: white;
}

.btn-remove:hover {
    background-color: #da190b;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

/* Mensagens */
.message,
p {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Confirmação de remoção */
.confirmation-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 30px auto;
    text-align: center;
}

.confirmation-box img {
    max-width: 200px;
    max-height: 200px;
    margin: 20px 0;
    border-radius: 4px;
}

.confirmation-box form {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.confirmation-box button,
.confirmation-box a {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    transition: all 0.3s ease;
}

.confirmation-box button {
    background-color: #f44336;
    color: white;
}

.confirmation-box button:hover {
    background-color: #da190b;
}

.confirmation-box a {
    background-color: #666;
    color: white;
}

.confirmation-box a:hover {
    background-color: #555;
}

/* Imagem - Preview e Preview em confirmação */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.confirmation-box img {
    max-width: 200px;
    max-height: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    header nav {
        width: 100%;
    }

    header a {
        flex: 1;
        text-align: center;
    }

    form {
        padding: 20px;
    }

    .sortable-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .image-container {
        width: 100%;
        flex-direction: column;
    }

    .image-actions {
        width: 100%;
    }

    .btn-edit,
    .btn-remove {
        flex: 1;
        text-align: center;
    }
}
