/* Main Styles for AW7 Postagens */

:root {
    /* AW7 colors */
    --primary-color: #6CBD45;     /* AW7 Green */
    --secondary-color: #0A1C30;   /* AW7 Dark Blue */
    --accent-color: #405DE6;      /* Blue accent */
    --soft-button-bg: #FAFAFA;    /* Almost white background */
    --text-primary: #262626;      /* Soft black */
    --text-secondary: #8E8E8E;    /* Gray */
    --background: #FFFFFF;        /* Pure white */
    --danger-color: #ED4956;      /* Red */
    --success-color: #58CF86;     /* Green */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--background);
    line-height: 1.5;
}

/* AW7 gradient header */
.instagram-gradient {
    background: linear-gradient(45deg, #0A1C30, #6CBD45);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

/* Cards */
.card {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: var(--soft-button-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #c62e60;
    border-color: #c62e60;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background-color: #3651c6;
    border-color: #3651c6;
    color: white;
}

.btn-soft {
    background-color: var(--soft-button-bg);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(225, 48, 108, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-text {
    color: var(--text-secondary);
}

/* Custom radio buttons and checkboxes */
.custom-radio-btn {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-radio-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Tables */
.table {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--soft-button-bg);
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(225, 48, 108, 0.05);
}

/* Alerts */
.alert-success {
    background-color: var(--success-color);
    color: white;
    border: none;
}

.alert-danger {
    background-color: var(--danger-color);
    color: white;
    border: none;
}

/* Custom file input */
.custom-file-upload {
    border: 1px dashed var(--primary-color);
    display: inline-block;
    padding: 30px;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    text-align: center;
    transition: all 0.3s;
    background-color: rgba(225, 48, 108, 0.05);
}

.custom-file-upload:hover {
    background-color: rgba(225, 48, 108, 0.1);
}

.custom-file-upload i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Upload preview */
.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid var(--soft-button-bg);
}

/* Estilos para o sistema de upload de imagens */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
    margin-bottom: 20px;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(108, 189, 69, 0.1);
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    transition: transform 0.2s;
}

.preview-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.image-preview-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    overflow: hidden;
}

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

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

/* Classe específica para corrigir o problema de esticamento */
.img-upload-preview, .card-img-top {
    width: 100%;
    height: auto;
    max-width: 1080px;
    max-height: 1350px;
    object-fit: contain; /* Mantém a proporção e adiciona borda branca se precisar */
    background-color: white; /* Preenche áreas vazias com branco */
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 5px;
}

/* Conteíner para imagens com tamanho fixo */
.image-container {
    width: 100%;
    height: 300px; /* Altura fixa para todas as imagens */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 10px;
}

.preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.file-info {
    padding: 5px;
    font-size: 12px;
    color: #666;
    text-align: center;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

/* Dashboard stats */
.stats-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-card .stats-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.stats-card.clients {
    border-left-color: var(--secondary-color);
}

.stats-card.clients .stats-icon {
    color: var(--secondary-color);
}

.stats-card.users {
    border-left-color: var(--accent-color);
}

.stats-card.users .stats-icon {
    color: var(--accent-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-header, .card-body {
        padding: 1rem;
    }
    
    .preview-item {
        width: 80px;
        height: 80px;
    }
    
    .custom-radio-btn {
        display: block;
        margin-bottom: 10px;
        width: 100%;
        text-align: center;
    }
}

/* Navigation active state */
.navbar .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: var(--soft-button-bg) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
