/* Modal de Edição do Perfil do Colunista */
.modal-header-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    border: none;
}

.modal-content-custom {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-photo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.profile-photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.profile-photo-preview:hover {
    transform: scale(1.05);
}

.photo-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.profile-photo-container:hover .photo-edit-overlay {
    opacity: 1;
}

.photo-edit-overlay i {
    color: white;
    font-size: 24px;
}

.form-group-custom {
    margin-bottom: 20px;
}

.form-control-custom {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control-custom:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.textarea-custom {
    min-height: 100px;
    resize: vertical;
}

.social-input-group {
    position: relative;
}

.social-input-group .input-group-addon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    border-radius: 8px 0 0 8px;
    padding: 12px 15px;
}

.social-input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.checkbox-custom {
    position: relative;
    margin: 15px 0;
}

.checkbox-custom input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.checkbox-custom label {
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
}

.checkbox-custom label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background: white;
    transition: all 0.3s ease;
}

.checkbox-custom input[type="checkbox"]:checked + label:before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.checkbox-custom label:after {
    content: '\f00c';
    font-family: 'FontAwesome';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox-custom input[type="checkbox"]:checked + label:after {
    opacity: 1;
}

.btn-save-profile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-save-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-cancel-profile {
    background: transparent;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    padding: 10px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.btn-cancel-profile:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

.modal-body-custom {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.social-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.social-section h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.social-section h5 i {
    margin-right: 10px;
    color: #667eea;
}

/* Loading states */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animações de entrada */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -30px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.modal.fade .modal-dialog {
    animation: fadeInDown 0.3s ease-out;
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-body-custom {
        padding: 20px 15px;
        max-height: 80vh;
    }
    
    .profile-photo-container {
        width: 100px;
        height: 100px;
    }
    
    .profile-photo-preview {
        width: 100px;
        height: 100px;
    }
    
    .photo-edit-overlay {
        width: 100px;
        height: 100px;
    }
    
    .social-input-group .input-group-addon {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .btn-save-profile,
    .btn-cancel-profile {
        padding: 10px 20px;
        font-size: 14px;
        letter-spacing: 0.5px;
    }
}

/* Estados de validação */
.form-control-custom.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control-custom.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.valid-feedback {
    display: block;
    color: #28a745;
    font-size: 12px;
    margin-top: 5px;
}

/* Melhorias no upload de foto */
.photo-upload-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: #1976d2;
}

.photo-upload-info i {
    margin-right: 5px;
}

/* Estilo para input file oculto */
#fotoUsuario {
    display: none;
}

/* Tooltip customizado */
.tooltip-custom {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip-custom .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip-custom:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}