/* Anonymous Catalog Styles - Copied and adapted from bae-catalog-style.css */

/* Base */
#bae-anonymous-catalog-wrapper { padding: 22px; background: #ffffff; border-radius: 14px; box-shadow: 0 8px 30px rgba(11,22,42,0.06); font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif; color:#1d2939; }

/* Filters bar centered, controls same width/height */
#bae-anonymous-catalog-wrapper .filters-bar { display:flex; flex-direction:column; gap:12px; align-items:center; justify-content:center; margin-bottom:18px; }
#bae-anonymous-catalog-wrapper .filters-row { display:flex; gap:12px; align-items:center; justify-content:center; flex-wrap:wrap; }
#bae-anonymous-catalog-wrapper .buttons-row { display:flex; gap:12px; align-items:center; justify-content:center; }
#bae-anonymous-catalog-wrapper .filters-bar input[type="search"], #bae-anonymous-catalog-wrapper .filters-bar select, #bae-anonymous-catalog-wrapper .filters-bar button {
    width:220px;
    height:44px;
    padding:10px 12px;
    border-radius:10px;
    border:1px solid #e6e9ef;
    background:#fff;
    font-size:14px;
    box-sizing:border-box;
}

/* Grid */
#bae-anonymous-catalog-wrapper .grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap:18px; margin-bottom:16px; }

/* Card vertical layout, pointer cursor */
#bae-anonymous-catalog-wrapper .candidate-card {
    border-radius:12px; padding:14px; background:#ffffff;
    box-shadow: 0 6px 18px rgba(11,22,42,0.04);
    display:flex; user-select:none; transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
    border: 1px solid rgba(15,23,42,0.04); flex-direction:column; align-items:center; text-align:center; position:relative;
    cursor: pointer;
}
#bae-anonymous-catalog-wrapper .candidate-card:active { cursor:grabbing; }
#bae-anonymous-catalog-wrapper .candidate-card.dragging { transform: scale(0.995); box-shadow: 0 12px 30px rgba(11,22,42,0.08); }

/* Photo top & centered */
#bae-anonymous-catalog-wrapper .photo-wrap { width:140px; height:140px; border-radius:12px; overflow:hidden; background:#f2f4f7; display:flex; align-items:center; justify-content:center; margin:0 auto 12px auto; transition:transform .18s ease; }
#bae-anonymous-catalog-wrapper .candidate-photo { width:140px; height:140px; object-fit:cover; display:block; transition:transform .22s ease, filter .22s ease; }
#bae-anonymous-catalog-wrapper .candidate-card:hover .candidate-photo { transform: scale(1.06); filter:brightness(1.02); }

/* Body below photo */
#bae-anonymous-catalog-wrapper .card-body { width:100%; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; min-height:80px; }
#bae-anonymous-catalog-wrapper .candidate-id { font-weight:700; color:#0f1724; margin-bottom:6px; font-size:13px; }
#bae-anonymous-catalog-wrapper .candidate-name { font-size:16px; color:#081029; margin-bottom:8px; font-weight:600; }

/* Info list full width so long emails wrap */
#bae-anonymous-catalog-wrapper .candidate-info { list-style:none; padding:0; margin:0; width:100%; text-align:left; }
#bae-anonymous-catalog-wrapper .candidate-info li { font-size:13px; color:#64748b; margin-bottom:4px; }
#bae-anonymous-catalog-wrapper .candidate-info strong { color:#374151; }

/* Select label and checkbox */
#bae-anonymous-catalog-wrapper .select-label { display:flex; align-items:center; gap:6px; margin-top:10px; cursor:pointer; }
#bae-anonymous-catalog-wrapper .select-candidate { margin:0; }
#bae-anonymous-catalog-wrapper .select-text { font-size:13px; color:#6b7280; }

/* Selection check mark */
#bae-anonymous-catalog-wrapper .selection-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(210, 190, 190, 0.9);
    color: white;
    font-size: 24px;
    font-weight: bold;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Selected state */
#bae-anonymous-catalog-wrapper .candidate-card.selected { background: linear-gradient(180deg, rgba(210,190,190,0.14), #ffffff); border-color: rgba(210,190,190,0.7); box-shadow: 0 14px 34px rgba(210,190,190,0.08); transform: translateY(-4px); }

/* Selected items container */
#selected-items-container { margin-bottom:16px; }
#selected-items-list { list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:8px; }
#selected-items-list li { background:#f1f5f9; padding:6px 10px; border-radius:6px; font-size:13px; display:flex; align-items:center; gap:6px; }
#selected-items-list .remove-item { background:none; border:none; color:#ef4444; cursor:pointer; font-size:16px; line-height:1; }

/* Grid footer */
.grid-footer { display:flex; justify-content:flex-end; gap:12px; margin-top:20px; }
.grid-footer button { padding:12px 20px; border-radius:8px; border:none; font-size:14px; font-weight:600; cursor:pointer; transition:background .2s; }
.grid-footer .primary { background:#D2BEBE; color:white; }
.grid-footer .primary:hover { background:#c4a8a8; }

/* Modal styles (copied) */
.bae-modal-backdrop { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.7); z-index:10000; display:flex; align-items:center; justify-content:center; }
.bae-modal { background:white; border-radius:12px; max-width:800px; width:90%; max-height:90vh; overflow-y:auto; position:relative; }
.bae-modal-close { position:absolute; top:10px; right:10px; background:none; border:none; font-size:24px; cursor:pointer; }
.bae-modal-body { padding:20px; display:flex; gap:20px; }
.modal-left { flex:1; }
.modal-right { flex:1; }
.modal-photo-section img { width:100%; border-radius:8px; }
.modal-gallery { display:flex; gap:10px; margin-top:10px; flex-wrap:wrap; }
.modal-thumb img { width:60px; height:60px; object-fit:cover; border-radius:4px; cursor:pointer; }
.modal-thumb:hover { opacity:0.8; }
.info-item { display:flex; align-items:flex-start; gap:10px; margin-bottom:10px; }
.info-icon { width:20px; height:20px; flex-shrink:0; }
.info-label { font-weight:600; min-width:60px; }
.info-value { flex:1; }

/* Catalog form grid styles - for submission form */
.catalog-form-grid {
    display: block; /* Mobile: single column layout */
    max-width: 800px;
    margin: 30px auto;
    padding: 24px; /* Mobile padding increased by 20% */
    box-sizing: border-box;
}

.catalog-form-grid h3 {
    text-align: center;
    margin: 18px 0 12px 0;
    font-size: 24px; /* Title increased by 20% */
    color: #1d2939;
}

.catalog-form-grid .form-group {
    margin-bottom: 24px; /* Spacing increased by 20% */
}

.catalog-form-grid .form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    font-size: 19px; /* Labels increased by 20% */
    margin-bottom: 10px; /* Label margin increased by 20% */
}

.catalog-form-grid input[type="text"],
.catalog-form-grid input[type="date"],
.catalog-form-grid select,
.catalog-form-grid input[type="file"] {
    width: 100%;
    height: 58px; /* Height increased by 20% */
    padding: 14px 17px; /* Padding increased by 20% */
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    box-sizing: border-box;
    font-size: 19px; /* Font size increased by 20% */
    transition: border-color 0.2s ease;
}

.catalog-form-grid input[type="text"]:focus,
.catalog-form-grid input[type="date"]:focus,
.catalog-form-grid select:focus,
.catalog-form-grid input[type="file"]:focus {
    outline: none;
    border-color: #D2BEBE;
    box-shadow: 0 0 0 3px rgba(210, 190, 190, 0.1);
}

.catalog-form-grid input[type="file"] {
    height: auto;
    padding: 8px;
}

.catalog-form-grid button {
    background: #D2BEBE;
    color: white;
    padding: 17px 34px; /* Button padding increased by 20% */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 19px; /* Button font size increased by 20% */
    font-weight: 600;
    transition: background 0.2s ease;
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 0 auto;
}

.catalog-form-grid button:hover {
    background: #c4a8a8;
}

/* Desktop: 2-column grid layout */
@media (min-width: 768px) {
    .catalog-form-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 0 20px; /* Desktop padding */
    }

    .catalog-form-grid h3 {
        grid-column: span 2;
    }

    .catalog-form-grid input[type="file"] {
        grid-column: span 2;
    }

    .catalog-form-grid button {
        grid-column: span 2;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .catalog-form-grid {
        grid-template-columns: 1fr; /* Una sola columna explícita */
        gap: 12px;
        margin: 20px auto;
        max-width: 100%;
        padding: 0 15px;
    }

    .catalog-form-grid h3 {
        font-size: 16px;
        margin: 12px 0;
        grid-column: 1; /* Asegura que esté en la primera columna */
    }

    .catalog-form-grid .form-group {
        grid-column: 1; /* Cada grupo de formulario ocupa toda la anchura */
    }

    .catalog-form-grid .form-group label {
        font-size: 13px;
        display: block; /* Asegura que los labels estén en bloque */
    }

    .catalog-form-grid input[type="text"],
    .catalog-form-grid input[type="date"],
    .catalog-form-grid select,
    .catalog-form-grid input[type="file"] {
        height: 40px;
        padding: 8px 10px;
        font-size: 14px;
        width: 100%; /* Asegura anchura completa */
        grid-column: 1; /* Explícitamente en la primera columna */
    }

    .catalog-form-grid input[type="file"] {
        height: auto;
        padding: 6px;
        grid-column: 1; /* Una sola columna en móvil */
    }

    .catalog-form-grid button {
        grid-column: 1; /* Ocupa toda la anchura en móvil */
        padding: 14px 20px;
        font-size: 15px;
        width: 100%; /* Botón de anchura completa */
        max-width: none; /* Remueve límite de anchura máxima */
        justify-self: stretch; /* Estira para ocupar todo el espacio */
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .catalog-form-grid {
        padding: 0 10px;
        gap: 10px;
        margin: 15px auto;
        grid-template-columns: 1fr; /* Una sola columna */
    }

    .catalog-form-grid h3 {
        font-size: 14px;
        margin: 10px 0;
        grid-column: 1;
    }

    .catalog-form-grid .form-group {
        grid-column: 1;
    }

    .catalog-form-grid .form-group label {
        font-size: 12px;
    }

    .catalog-form-grid input[type="text"],
    .catalog-form-grid input[type="date"],
    .catalog-form-grid select {
        height: 36px;
        padding: 6px 8px;
        font-size: 13px;
        width: 100%;
        grid-column: 1;
    }

    .catalog-form-grid input[type="file"] {
        height: auto;
        padding: 6px;
        grid-column: 1;
    }

    .catalog-form-grid button {
        padding: 12px 16px;
        font-size: 14px;
        width: 100%;
        grid-column: 1;
        justify-self: stretch;
    }
}